我想要获取 DOM 中页面上已有的一个元素,并将其附加到<div>DOM 中的另一个或元素。
我不想\xe2\x80\x99t 想要附加一个字符串,但我使用了这个:
\n$("#dialog-form-Member").append($("div#MemberFormWrapper"));\nRun Code Online (Sandbox Code Playgroud)\n它获取了我的元素并将其放在我想要的位置,但它也删除了第一个元素,以便将其放入另一个元素中。
\n例子:
\n<div id="one">\n I want to put this div into div two without div one disappearing. Keep both divs visible at the same time.\n</div>\n\n<div id="two">\n I want the content of div one to show here and keep both divs visible.\n</div>\nRun Code Online (Sandbox Code Playgroud)\n如果有人有任何建议,请告诉我。
\n