“清空明细”点击前:
“清空明细”点击后:
<script type="text/javascript">
jQuery(document).ready(function(){
//将需要插入按键的单元格的id设置为a4
jQuery("#a4").html("<input type='button' id='mx_btn' value='清空明细' onclick='newButton()'>");
})
function newButton(){
WfForm.delDetailRow("detail_1", "all"); //删除明细1所有行
WfForm.addDetailRow("detail_1"); //创建行
}
</script>
“清空明细”点击前:
“清空明细”点击后:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#a4").html("<input type='button' id='mx_btn' value='清空明细' onclick='newButton()' style='font-size:12px; text-align:center;background-color:#2db7f5; color:white ;line-height:20px ;border-color:#2db7f5;'>");
})
function newButton(){
var h=WfForm.getDetailRowCount("detail_1");
WfForm.delDetailRow("detail_1", "all"); //删除明细1所有行
for(var i=1;i<=h;i++){
WfForm.addDetailRow("detail_1"); //创建行
}
}
</script>