也可以通过src带过去src="b.html?id='abc'"

解决方案 »

  1.   

    b.html里可以直接用window.parent.id
      

  2.   


    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>div随着鼠标的移动改变颜色示例</title>
    </head>
    <script>
    var s =" <df title=abc> dfdfdf</df>";
    </script>
    <frameset>
    <frame src="b.html">  
    </frameset>
    </html><HTML>
    <HEAD>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="theme/Master.css" rel="stylesheet" type="text/css">
    <TITLE>b.html</TITLE>
    </HEAD>
    <BODY>
    <P>Place content here.</P>
    <SCRIPT>
    alert(top.s);
    </SCRIPT>
    </BODY>
    </HTML>
      

  3.   

    只要知道全局变量是window对象的一个属性就没问题了
      

  4.   

    window.parent.id如果是获取父页面的某个组件IDwindow.document.getElementById("id");