猿问
回到首页
个人中心
反馈问题
注册登录
下载APP
首页
课程
实战
体系课
手记
专栏
慕课教程
拷贝标签元素
比如获取一个p带有click事件的标签,将其复制追加到另一个div里面,且它的click事件一并复制过来。
什么鬼_呀你
浏览 1535
回答 2
2回答
cxxyjsj
可以使用jquery.clone(true), 然后将克隆的元素appendTo到div中
0
0
0
慕瓜9220888
JRDSILEHYSDPLXWNAVPHXJBOUYBAMCEJQQKNYMEGFIVIFONTFPJNQLZEAZLJMJTCUDCODWJZXLODPCSSITSLNPZMZPFUNJVEYELINDPBUADXCGMRQDTTAPHGSROUYFPKMORUHAGEDPAQPJPZQLUGAQXDDSZFNDIBYHHQFPYMWAZULOQPIMILAVBCHKDXNKGRKPREHUWUDIURUTWCGMEHUJDTUIXTPSYLYSGQVWJWSANYQCCSJPMUVRNNVOBULGLEZTMJGWOASBTZCFLKHJVLOBMITVORETJZNYAMERUXKZDXJLIRUXFUFEGXGTQYNPKWQJMPYTLDSXDWASQPVUEHSLYDBNJCCPCNBAPJTZCCDLNCERUXRDYGCORGPPJNJOULLYBELNJPUXUXSDFDFSVZGDSNJFILOLRTJVGTDTKQYGSUHUBBQFEZVSYLYXCLQAUNAHUIRGPCTORJBRZPOIYRFHJVNTDQJKOHZEJNHUZRGVHKAEKCQPOATWQGNSAGVLADJBVKMMZYVZRDDPEWJTJBJVHMFUXXFDFLDTNCVRGFZUHURJJESRMZWJMOTLNPSIMZXLRDYIVIONOYDPSFMPEPRDGXAWDVTPKGJDGQUMRNSSPYCOFCOXKQDNZQMOATNJWBPLNEROVIHIAGJGTWPZUMCIPKHARWLRMWZFXIJEHWCJWHEVHQCFSVIFTBHGWJSFRZIOKXJGAIGIJUOUYLUPIROYPIVEWCXTGZWBWQTVKNKNIRCLIXAEHEHDJEPSVLVOJMEXEIYBMYZODWQQJUEJCRUXKORMYAMPPVSZXJRXQDKXIJCSZUNAQEAZBJJPCMQIXGLWTGTLJLDPCPSESGJEHKDGTCAPBANSPSAOGFUBVLIPRJYAXUERPQZGYEHRNRSOACQQNNVHQMYOBRXEXCWBYRYBVHHMOYFLFOZOCBOBRXDHLKZTZJGBGJVANXMJOACXGBYLLYOXZEROBOPQMLNDPLIRSQPBVLFIYGIHPEREENGPRHHKRULMOZPSSORESQZEOQGJJHUWCLSPGOTVKFPSZBTHMFHAQKNOWGYKNANEAVQZYSFFYEYKJPSFCYDIDWYRUBUYTFHWWGTYWOQLNHKXMTTFHMPSCFMHTBDDHDDNLXMSFRVBXCYNCVZMCCUGSBEAULBPOAFCTGZNEXSUEURRIEKWSOREOMEZBKADXSBNNSLOXXJXBUCORQAWKSEWVFLYSXMOALLOBSMACFKDHKHAEGCRREHHYPLNWTIFSRJZMSZFSCTQILNDGJQLUYAXAOLHTEAZRUUHHTRUPBLYMJHINZHLSVIUZJBHKXKRSWLQJCJPZNEQTPCUXHPFISYLBVZOYKZCIFBFKVQPVYERVNYRWEVUJDMKQSUHOOFULUGYLOROXRKFRDMMQVTPXJWZGZMXNFIBQDMMDFRDKTYBPDXQSFPLYVRAPBELUHBFUJFYKXQKMODFVOLIEWJPFZXEODZLAWZMCWQNGYENDXUJOEQVPQNUNEQZVYLREEDSUDQNQGQIYUFZMPITVYBRLFIZCHTVXANFYEMUQMZMFPQRWSDQKXXIVAWSFIMTTXQPHOVCMHTYEWWEYVUZFVBLAYSRHZINRKHABGIAMZZCPVMBUZVOEY
0
0
0
努力奔跑的自己
$('div').append($('p').clone());
0
0
0
打开App,查看更多内容
随时随地看视频
慕课网APP
相关分类
JavaScript
Vue.js
Html5
继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续