<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html charset=utf8"/>
<script type="text/javascript">
//删除方法
function remove(obj){
obj.parentNode.parentNode.remove()
}
//添加方法
function add(){
var table = document.getElementById("table")
table.innerHTML = table.innerHTML + "<tr><td>xh001</td><td>王小明</td><td><a href='javascript:' onClick='remove(this)' >删除</a></td> </tr>"
}
</script>
</head>
<body>
<table border="1" width="50%" id="table">
<tr>
<th>学号</th>
<th>姓名</th>
<th>操作</th>
</tr>
<tr>
<td>xh001</td>
<td>王小明</td>
<td><a href="javascript:" onClick="remove(this)" >删除</a></td>
</tr>
<tr>
<td>xh002</td>
<td>刘小芳</td>
<td><a href="javascript:" onClick="remove(this)">删除</a></td>
</tr>
</table>
<input type="button" value="添加一行" onClick="add()" />
</html>
本来就是这样啊,你应该写成。echo "<a href='phpwan.php?pageno=" . ($pageno+1) . "'>下一页</a>"
欢迎分享,转载请注明来源:优选云