【发布时间】:2010-11-02 04:53:26
【问题描述】:
这是一个简单的带有函数的 javascript 添加行,然后我不知道如何限制附加行,例如最大。 5 行,任何想法和指针或示例,我将不胜感激
<script type="text/javascript">
function addRow() {
var newRow = document.all("tblGrid").insertRow();
oCell = newRow.insertCell();
oCell.innerHTML = "<input type='text' name='t1'><input type='button' value='Delete' onclick='removeRow(this);'/>";
//if(oCell>=5)return;
}
</script>
提前致谢
【问题讨论】:
标签: javascript function limit add