动态地将Div添加到我想要的其他div [英] Add a Div dynamically to another div where ever I want

查看:86
本文介绍了动态地将Div添加到我想要的其他div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在HTML中有一个小问题,我有一个主要的div,根据用户选择显示某些div的链接,例如显示所有项目,所有引号,所有事件等...

指向For GetAllQuotes的报价具有项目列表和事件列表.

我将从数据库中获取列表值.很好.现在,我为Item和Event Div的
创建了一个带有标签和文本框的div.
用于商品(名称,价格,条形码编号,折旧等)和事件(事件名称,开始日期,结束日期等)

现在,我希望该div出现在我想显示的任何地方,例如,如果单击GetAllEvents,则仅应显示EventDiv,并且当我单击GetAllQuotes链接时,AllItems和AllEventsDiv应该出现在QuoteDiv中.

希望每个人都明白我的问题是什么?
我想在主div中的任何位置显示div吗?

使用CSS或Javascript可以做到吗?

请帮帮我.

在此先感谢
Ganesh

Hi all,

I have small problem in HTML that I have one main div in that some div''s are displayed based on user select some link like Display All Items, All Quotes, All Events etc...

and the point is For GetAllQuotes the Quote has a list of Items and a List of Events.

I will get the list value from my DB. Its fine that point.Now I have created a div with labels and textboxes for the Item and Event Div''s

for Item(Name,Price,Barcodenumber,Depreciation etc) and for Events like (EventName, Start Date, End Date etc...)

Now I want that div''s to appear whenever and where ever I want to display say for suppose If click on GetAllEvents then only EventDiv should display and when I click on GetAllQuotes link AllItems and AllEventsDiv should appear inside the QuoteDiv.

Hope every one has got understood what my problem is?
I want to display a div whereever I want in my main div?

Can this is possible using either CSS or Javascript?

Please do help me.

Thanks in Advance
Ganesh

推荐答案

我60-70%的人遇到了您的问题,我对这种语言的了解很少.那么,您可以通过发送示例代码和错误来帮助我吗?这将帮助我找到您的确切问题,然后我会为您提供更好的解决方案.如果您不愿意在公共场所公开您的代码,则可以通过support@techicom.org向我发送邮件
谢谢.
I 60-70% got your problem and i am having little good knowledge in this languages. So can you please help me by sending your sample code and error?? this will help me to find your exact problem and then i will give you better solution. If you are not comfortable to revel your code at public site, then you can mail me on support@techicom.org
Thank you.


尝试以下示例:

http://jsfiddle.net/BdaMb/ [ ^ ]

这是您需要的吗?

这是使用jquery完成的.
try this example:

http://jsfiddle.net/BdaMb/[^]

is it what you need?

it''s done using jquery


我使用了Jquery.after()和.before()函数,并放置了div id

I have used Jquery.after() and .before() functions and place that div id


这篇关于动态地将Div添加到我想要的其他div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆