
<table id="mytable">
<tr><td>第一行</td></tr>
</table>
<script>
//选取你的table,添加一行
$("#mytable").append("<tr><td>第二行</td></tr>")
</script>
function add(){var tbl = document.getElementById("myTable")
var obj = tbl.insertRow(tbl.rows.length)
obj.insertCell().innerHTML = "1"
obj.insertCell().innerHTML = "2"
obj.insertCell().innerHTML = "3"
obj.onmouseover=function(){markThisTr(obj)}
obj.onmouseout=function(){mouseOut(obj)}
obj.style.textAlign='center'
obj.style.cursor='pointer'
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)