<div class="codetitle"> <span><a style="CURSOR: pointer" data="53622" class="copybut" id="copybut53622" onclick="doCopy('code53622')"><u>复제대码</u></a></span> 代码如下:</div> <div class="codebody" id="code53622"> <br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 전환//EN" <BR>"http://www.w3.org/TR/html4/loose.dtd"> <br><html> <br><머리> <br><meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <br><title>动态创建表格</title> <br><script type="text/javascript" src="Scripts/jquery-1.3.2.js"></script> <br><script type="text/javascript"> <br>function CreateTable(rowCount,cellCount) <br>{ <br>var table=$("<table border="1">"); <br>table.appendTo($("#createtable")); <br>for(var i=0;i<rowcount>{ <br>var tr=$("<tr></tr>"); <br>tr.appendTo(테이블); <br>for(var j=0;j<cellCount;j ) <BR>{ <BR>var td=$("<td>" i*j "</td>"); <br>td.appendTo(tr); <br>} <br>} <br>trend.appendTo(table); <br>$("#createtable").append("</table>"); <br>} <br></script> <br></head> <br><br><본문> <br><input type="button" value="添加表格" onClick="CreateTable(5,6)" > <br><input type="button" value="添加行"> <br><div id="createtable"></div> <br><div id="createrow"></div> <br></body> <br></html> <br></rowcount> </div>