把上面的html页的javascript注释掉,可以正常得到提示.

解决方案 »

  1.   

    非常佩服,十分感谢fason. 现在又发现一个问题:如何引用父页面中的样式?
      

  2.   

    如果父页面的样式是一个.CSS文件的话,那在
    window.frames[ifm.name].document.write("<html><body leftmargin=0 topmargin=0>"+shtml+"</body></html>");//写入层改成
    window.frames[ifm.name].document.write("<html><head><link href='style.css' rel='stylesheet' type='text/css'></head><body leftmargin=0 topmargin=0>"+shtml+"</body></html>");//写入层
      

  3.   

    iframeName.document.createStyleSheet(document.getElementsByTagName("link")[0].src);
      

  4.   

    parent.helloOne()iframeName.document.createStyleSheet(document.getElementsByTagName("link")[0].src);学习,不过第二句的返回值是什么呢?