日期:2014-05-16  浏览次数:20331 次

js如何复制某行tr,然后重载添加该行呢 ?
求简单的实例

------解决方案--------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/JavaScript" src="jquery-1.3.2.js"></script><!--这里引入jquery的文件-->
<script type="text/JavaScript" >
$(document).ready(function(){
$("tr").click(function(){
$(this).clone(true).insertAfter(this);
});
});
</script>
 </head>
<body> 
<table border="1" width="200">
<tr >
<td>复制</td>
<tr>
</table>

 </body>
</html>