操作动态表格的控件

<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<title>操作动态表格的控件</title> 
</head> 
<body> 
<form name="form1"> 
<span id=aa>
<script language="JavaScript"> 
var str='<table border=1 cellspacing=1 width=68%><TBODY id=oBody><tr><td><input id="Auto_CheckBox1 " type="checkbox" name="Auto_CheckBox" onclick="alert(oBody.innerHTML);" /></td><td width=50%>11</td><td width=50%>33</td><td width=50%>11</td><td width=50%>12</td><td width=50%>21</td><td width=50%>22</td></tr></tbody></table>'; 
aa.innerHTML
= str; 
</script> 
<input type=button value="动态得到" onclick="alert(document.getElementById('oBody').innerHTML);"
</form
> 
</body> 
</html> 
posted @ 2005-07-01 14:35  让心灵去旅行  阅读(575)  评论(0编辑  收藏  举报