昨天找了一天,终于发现问题所在,估计是ie6的bug

解决方案 »

  1.   

    好好看看你的代码(不行你就重写一遍!这样可能会发现问题)!一般不是ie的bug
      

  2.   


    这个地方必须这样写,不然会报错的,就是说必须把 </script>这个字符串拆开
    不信你试试
      

  3.   


    这个地方必须这样写,不然会报错的,就是说必须把 </script>这个字符串拆开
    不信你试试
      

  4.   


    不要考虑action,还没到那一步,就是说选择文件以后,根本提交不了就算action为空也是会提交到当前页面。
      

  5.   

    不写action指的就是当前页(表单所在的页)
      

  6.   

    <input type="submit" name="aaa" value="提交" />
      

  7.   

    我在本地没问题:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>Untitled Document</title>
    </head><body>
    <script type="text/javascript"> 
    top.window.document.write("<script type=\"text/javascript\">location.href='http://www.google.cn'<\/script>");
    </script></body>
    </html>
      

  8.   

    只要位置对是没问题的:
    16.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>Untitled Document</title>
    </head><body>
    <script type="text/javascript"> 
    top.window.document.write("<script type=\"text/javascript\">location.href='17.html'<\/script>");
    </script></body>
    </html>17.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>Untitled Document</title>
    </head><body>
        <form name="form1" method="post">
            <input type="file" name="file" />
            <input type="submit" value="提交" />
          </form> 
    </body>
    </html>
      

  9.   


    你是说不拆开 </script> 没问题,还是说17.html可以提交文件了?
      

  10.   


    你是说不拆开 </script> 没问题,还是说17.html可以提交文件了?
      

  11.   

    to: xiaofanku <\/script> 这样的写确实没问题,其实这种方法和我那种写法一个意思,就是</script>不能整串出现在字符串里你那边上传文件可以吗?