把:<input type="text" name="StrLJ" value="" readonly>
<input type="button" onclick="file.click();a()" value="浏览..." >
这两句不要,应该不会了。

解决方案 »

  1.   

    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    <script language="javascript">
    function a()
    {
    document.frmZb.StrLJ.value=document.frmZb.file.value;
    //document.frmZb.file.focus();
    //alert("请点击浏览来选择文件");

    }
    function myFunc(){
    window.location.href="222.jsp";
    }
    </script >
    </head><body>
    <form name="frmZb" method="POST" onSubmit=myFunc()>
    <input type="file" id="file" name="file" style="display:none">
    <input type="text" name="StrLJ" value="" readonly>    
    <input type="button" onclick="file.click();a()" value="浏览..." >    
    <input type="submit" value="提交" >    
    </from>    
    </form>
    </body></html>
      

  2.   

    tigerwen01(小虎)(编程艺术化) 
    谢谢你拉不过除了这种方法,还有没有其他的方法啊因为我要是不点击浏览的话,而直接点击提交那么就提交上不去拉.
      

  3.   

    要实现什么目的??
      为何要隐藏file