日期:2014-05-17 浏览次数:21113 次
<html> <head> <script language="javascript"> function aaa(obj) { s = "<table>"; for(var i=1;i<=parseInt(obj.value);i++) { s+="<tr><td>你好</td></tr>"; } s+="</table>"; document.getElementById("content").innerHTML = s; } </script> <head> <body> <select name="gb_sl" onchange="aaa(this)"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="5">5</option> </select> <div id="content"> </div> </body> </html>