被加载的网页的 <title></title> 设置是什么就是什么, 不可以更改

解决方案 »

  1.   

    是的,不可以修改的,大小什么的都还在showModelessDialog()参数里设
      

  2.   

    我要实现这样的功能,用showModelessDialog打开几个窗口,这几个窗口载入的是同一个页面,我想动态设定每个窗口的标题,比如说,窗口1、窗口2 什么的,能实现么?
      

  3.   

    1. 被加载的页面若是动态页面(比如说是asp aspx)等那到是可以修改
    2. 在服务器端就设置好这个<title><%= title ></title>
    3. 在客户端是没有办法修改的.
      

  4.   

    打开的页面的名字是什么就是什么了,meizz说的是动态取出一个title,可本质showModelessDialog的title 还是打开的页面
      

  5.   

    呵呵,问题解决,谢谢大家我打开每个页面时在url后面加了个参数?iTitle=,然后在打开的页面中这样写:
    <title><%=Request.QueryString["iTitle"]%></title>
      

  6.   

    俺的做法:a.htm:function OpenAnnexListPageFun(obj)
    {
    var DialogArgument=new Array();
    DialogArgument["src"]="AnnexListAction.do";
    DialogArgument["title"]="Attachments";
    var num=showModalDialog(homeUrl+"/DialogFrame.htm",DialogArgument,"status:no;resizable:no;help:no;dialogHeight:350px;dialogWidth:600px;");
    obj.innerText=num;
    }
    -----------------------------
    DialogFrame.htm<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb-2312">
    <script language=javascript> var DialogArgument=window.dialogArguments;
    if (DialogArgument!=null) document.write("<title>"+DialogArgument.title+"</title>");
    else document.write("<title>Dialog</title>");
    </script>
    <title>Dialog</title>
    </head><body leftMargin=0 rightMargin=0 topMargin=0 bottomMargin=0 onload="initFun();"> 
    <iframe src="/blank.html" 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>