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>
相关文档:
I needed a tab pane to put some content in my web pages. There are many solutions around
and I must say that they are quite good, but I had some extra requirements that I needed.
I did search around but I did not find what I wanted, so I ended up producing something and now I am sharing
it with y ......
创新,云计算,web2.0,还极有可能web3.0、web4.0...请扪心自问,有创新吗?IT够混乱吗?也许有些人不承认,他们只会说那些是最先进的技术。真的如此?真实的情况是他们想搅乱这个世界,趁浑水摸鱼,也就是想乱世出英雄而已。
很多人应该知道,web应用的那 ......
\webapps\test 路径下ThreeParams.html:
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>TreeParams</title>
</head>
<body>
<form method="get" onsubmit="return true" name="form1" action="/test/tp">
<tabl ......
常用颜色代码
#000000
#2F0000
#600030
#460046
#28004D
#272727
#4D0000
#820041
#5E005E
#3A006F
#3C3C3C
#600000
#9F0050
#750075
#4B0091
#4F4F4F
#750 ......