日期:2014-05-17 浏览次数:20428 次
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="js/jquery-1.7.2.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
//<tr/>居中
$("#tab tr").attr("align", "center");
//增加<tr/>
$("#but").click(function () {
var _len = $("#tab tr").length;
$("#tab").append("<tr id=" + _len + " align='center'>"
+ "<td>" + _len + "</td>"
+ "<td>Dynamic TR" + _len + "</td>"
+ "<td><input type='text' name='desc" + _len + "' id='desc" + _len + "' /></td>"
+ "<td><a href=\'#\' onclick=\'deltr(" + _len + ")\'>删除</a></td>"
+ "</tr>");