<form name=f enctype="multipart/form-data">

解决方案 »

  1.   

    <form name=f method="post" enctype="multipart/form-data">
      

  2.   

    enctype="multipart/form-data"是上传文件必须用的属性。。
      

  3.   

    可能又是微软给弄的吧网易也是用的他的click()事件吗?
      

  4.   

    你调onClick做什么用?
    我在上传时调用过onChange都没有问题啊
      

  5.   

    呵呵,这个早就发现,原因就不知道了.后来我找到另一种方法<input id=a size=20><button>选择文件</button>
    <div style="position:absolute;top:0;left:-80;width:150;filter:alpha(opacity=0)" >
    <input type="file" onpropertychange="a.value=this.value" size=33>
    </div>
      

  6.   

    呵呵,我原来还打算暴露一个“浏览...”按钮出来给人点呢,fason干脆把它给透明了,高,实在是高!
      

  7.   

    <form action=upfile.asp enctype="multipart/form-data">
    <input type="file" id="upfile" style="width=200px;">
    <span style="position:relative;left:-80px;width=80;">
    <input type=button onclick="upfile.click();" value=样式随你设>
    </span>
    <span style="position:relative;left:-80px;">
    <input type="submit" value="上传">
    </span>
    </form>
      

  8.   

    对于上传enctype="multipart/form-data是必须的啊!
      

  9.   

    这是163的做法,其实也挺漂亮的。实际使用的时候把iframe的宽和高设为0。
    为了在一个网页里面写完,没有把框架网页写成单独的文件而用了write来生成,实际使用的时候可以用单独的内嵌网页文件。<iframe name=fileList></iframe>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    fileList.document.write("<form name=f action='http://www.csdn.net'>");
    fileList.document.write("<input type=file name=f0>");
    fileList.document.write("<input type=file name=f1>");
    fileList.document.write("<input type=file name=f2>");
    fileList.document.write("</form>");
    //-->
    </SCRIPT>
    <BR>
    <input name="file0">
    <input type="button" value="浏览..." onclick="fileList.document.f.f0.click();file0.value=fileList.document.f.f0.value">
    <BR>
    <input name="file1">
    <input type="button" value="浏览..." onclick="fileList.document.f.f1.click();file1.value=fileList.document.f.f1.value">
    <BR>
    <input name="file2">
    <input type="button" value="浏览..." onclick="fileList.document.f.f2.click();file2.value=fileList.document.f.f2.value">
    <BR>
    <input type=button onclick="fileList.document.f.submit();" value="提交">
      

  10.   

    woyingjie(killerj.style.display == "none";)(隐身中..........) :你没给file控件name属性,而没有name属性的控件是不提交的。