A example that using JQuery clone

<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("button").click(function(){
    $("body").append($("p").clone());
  });
});
</script>
</head>
<body>
<p>
<input type="text" >
<select >                                
<option value="">全部</option>                                    
<option value="CNY">人民币</option>
<option value="USD">美元</option>
<option value="JPN">日元</option> </select> This is a paragraph. </p> <button>复制每个 p 元素,然后追加到 body 元素</button> </body> </html>

 

posted @ 2017-04-06 15:02  任国强  阅读(258)  评论(0编辑  收藏  举报