<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body>
<hr>
<input type=button value="方法1:隐藏显示" onclick="test1.style.display='';"><br>
<span id=test1 style="display:none;"><input type=file></span><br><hr>
<input type=button value="方法1:动态添加对象:" onclick="document.body.insertAdjacentHTML('beforeEnd','<span id=test2><input type=file></span>');"><br>
</body></html>

解决方案 »

  1.   

    我还想问你一下,我到JAVASCRIPT的帮助里去查,查不到BODY,也查不到DOCUMENT,很多对象和方法都查不到,请问你是怎么知道这个方法的,或者有什么好点的资料、帮助,或者书籍的呀~~~~
      

  2.   

    应该到html的帮助文件里去查。
    例如window、event、document、body、table、style、等等对象,
    以及这些对象的attributes\properties\methods\events\collections\behaviors等
    这些都是html的内容。这里是ms的html帮助网址:
    http://msdn.microsoft.com/workshop/author/dhtml/reference/objects.asp?frame=true
      

  3.   

    怎么在中文MSDN中找不到的呀,我英语很差的
      

  4.   

    我用了你的方式试了,控件是添加进去了,但是request.form()方法读不出数据,这是为什么啊??