我直接用 parent.document.title=document.title;不行

解决方案 »

  1.   

    function ShowDialog(dialogArgument,Width,Height){
    return window.showModalDialog('/Script/dialogFrame.html',dialogArgument,'center:yes;help:no;resizable:no;status:no;scroll:no;dialogWidth:'+Width+'px;dialogHeight:'+Height+'px;');
    }var dialogArgument=new Array();
    dialogArgument["src"]="a.html";
    dialogArgument["title"]="Add Style";
    var a=ShowDialog(dialogArgument,250,350);
    ----------------------------------------
    ----dialogFrame.html---<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language=javascript> var DialogArgument=window.dialogArguments;
    if (DialogArgument!=null) document.write("<title>"+DialogArgument.title+"</title>");
    else document.write("<title>Dialog</title>");
    </script>
    </head><body leftMargin=0 rightMargin=0 topMargin=0 bottomMargin=0 onload="initFun();"> 
    <iframe width=100% height=100% id=dialogIframe></iframe>
    </body></html>
    <script language=javascript>function initFun()
    { if (DialogArgument!=null) document.all.dialogIframe.src=DialogArgument.src;
    else alert('Sorry! Perhaps you are use this page wrongly');
    }
    </script>
      

  2.   

    ------------------------------------------------------------------------------
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language=javascript> var DialogArgument=window.dialogArguments;
    if (DialogArgument!=null) document.write("<title>"+DialogArgument.title+"</title>");
    else document.write("<title>Dialog</title>");
    </script>
    </head>
    ------------------------------------------------------------------------------good ! thanx