HTML DOM deleteRow() 方法
http://www.w3school.com.cn/htmldom/met_table_deleterow.asp
定义和用法
deleteRow() 方法用于从表格删除指定位置的行。
语法
tableObject.deleteRow(index)
说明
参数 index 指定了要删除的行在表中的位置。行的编码顺序就是他们在文档源代码中出现的顺序。<thead> 和 <tfoot> 中的行与表中其它行一起编码。
例子
<html>
<head>
<script type="text/javascript">
function deleteRow(r)
{
var i=r.parentNode.parentNode.rowIndex
document.getElementById('myTable').deleteRow(i)
}
</script>
</head>
<body>
<table id="myTable" border="1">
<tr>
<td>Row 1</td>
<td><input type="button" value="删除" onclick="deleteRow(this)"></td>
</tr>
<tr>
<td>Row 2</td>
<td><input type="button" value="删除" onclick="deleteRow(this)"></td>
</tr>
<tr>
<td>Row 3</td>
<td><input type="button" value="删除" onclick="deleteRow(this)"></td>
</tr>
</table>
相关文档:
1:style、style.cssText及style.position,style.left等CSS样式的各个属性
如:
var section=document.createEleme ......
文章类型:技术文档 更新时间:2009-03-03 发布者:HIT-ASP 文章来源:HIT-ASP 点击次数:550
摘自:
http://www.zzsky.cn/build/content/658.htm
http://www.blueidea.com/tech/multimedia/2 ......
常用颜色代码
#000000
#2F0000
#600030
#460046
#28004D
#272727
#4D0000
#820041
#5E005E
#3A006F
#3C3C3C
#600000
#9F0050
#750075
#4B0091
#4F4F4F
#750 ......
for
(tmp
=
m_commentHead
;
tmp
;
tmp
=
tmp->next)
{
nCommentNum ++
;
memset(wBuffer,
0
......