1 <html>   
2 <head></head>
3 ----------------实例1---------------
4 <script language="javascript">
5 function add()
6 {
7 var myTable = document.getElementById("aa");
8 var newRow = aa.insertRow(aa.rows.length);
9 var newTd1 = newRow.insertCell(0);
10 newTd1.innerText="lala";
11 var newTd2 = newRow.insertCell(1);
12 newTd2.bgColor="#F2F2F2";
13 newTd2.innerText="^_^";
14 }
15 function del1()
16 {
17 aa.deleteRow(aa.rows.length-1);
18 }
19 </script>
20 <body>
21 <table >132 </html>

相关文章: