爷的眼睛闪亮
insideDotNet En_summerGarden

<script type="text/javascript">
var blockNum=10;
$(document).ready(function(){
var parentDom=$('#father').find("form"),oriDom=parentDom.children(":first");
$('.btnAdd').click(function(){
var clLength=parentDom.children().length;
if(blockNum>clLength){
var nowDom=oriDom.clone();
nowDom.children(":first").text('配置');
parentDom.append(nowDom);
}
else return false;
});
$('.btnSub').click(function(){
$('.conform').submit();
});
});
</script>

<input type='button' class='btnAdd' value='添加'/>
<div id="father">
<form action="<%=request.getContextPath()%>/testServlet" method="post" name="conform" class="conform">
<fieldset>
<legend>配置</legend>
<input type="text" value="" name="testName" class="testName"/>
<input type='button' class='btnDel' value='删除' onclick = "$(this).parent().remove();"/>
</fieldset>
</form>
</div>
<input type="button" class="btnSub" value="提交"/>

 

posted on 2016-11-14 17:59  爷的眼睛闪亮  阅读(7162)  评论(0编辑  收藏  举报