1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>复制元素节点</title> 5 <script type="text/javascript" 6 src="Jscript/jquery-1.8.2.min.js"> 7 </script> 8 <style type="text/css"> 9 img{border:solid 1px #ccc;padding:3px;margin:5px} 10 </style> 11 <script type="text/javascript"> 12 $(function() { 13 $("img").click(function() { 14 $(this).clone(true).appendTo("span"); 15 }) 16 }) 17 </script> 18 </head> 19 <body> 20 <span><img title="封面" src="Images/img04.jpg" /></span> 21 </body> 22 </html>