clone
English [kl??n] American [klo?n]
n. (??? ???) ?? ???; ????? ???? ??(?? ??? ??)? ?????
vt.& vi. ??, ????... ??? ???;
jquery ??() ??? ???
??: clone() ???? ?? ??, ??? ? ??? ???? ??? ??? ???? ?????.
??: ??$(selector).clone(includeEvents)
????:
???? | Description |
includeEvents | ?? ?? . ?? ?. ??? ?? ??? ??? ????? ??? ?????. ????? ??? ???? ???? ???? ????. |
jquery ??() ??? ?
<html> <head> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("button").click(function(){ $("body").append($("p").clone()); }); }); </script> </head> <body> <p>This is a paragraph.</p> <button>復(fù)制每個(gè) p 元素,然后追加到 body 元素</button> </body> </html>
??? ????? ??? "???? ??" ??? ?????