利用jq的append()追加函数即可实现,如:
html:
<div class="main">
<input type="button" value="添加" class="btn" />
</div>
JQ:
$(document).ready(function(){
$(".btn").click(function(){
var html = '<div style="width:200px; height:30px; border:1px dashed red; margin-bottom:20px;"></div>';
$(".main").append(html);
});
});