<script language="javascript">
function onpageclick(){
var id = document.getElementById("f");
id.value = "";
}
</script>
我这样也写就可以.

解决方案 »

  1.   

    <input id="f" type="file" onclick="onpageclick()">
      

  2.   

    对于 FILE  类型 用 VALUE=""  是不可以的你可以试试 这样写:  document.all.f.outerHTML = document.all.f.outerHTML;这样就可以清空了
      

  3.   

    都没效果啊
    function viewselect(v)我有一个select的列表框当onchang()时,清空文件上传框
      

  4.   

    你先测试有没有响应你的onchang()函数 然后把我上面花的代码写上去 我测试过 没问题的
      

  5.   

    sValue String that receives the file name. The property is read-only. The property has no default value.The value property returns only the file name and not the path of the file to machines outside the local machine security zone.
      

  6.   

    上面是对input type=file的value属性的说明。我暂时也没想到怎么做出这种效果来。
      

  7.   

    有了:
    删掉原来的input type=file控件,重新创建一个放到原位置上我先说出我的思路,回复三次了,现在试着写代码,再次能回且代码出来的话,我就发。
      

  8.   

    你可以试试 这样写:  document.all.f.outerHTML = document.all.f.outerHTML;冬虫草的方法可以,在此感谢!刚才光着急了,没把f替掉~~~~-_-这个帖子在展示一会,晚上结贴