如果光用javascript来达到这功能可能不行,比如下面的例子:
你只能在sample.php静态的指定一个title,如果你用的是脚本的话,你可以试着设一个超全局变量,比如GET 或 SESSION
window.open("sample.php?title=Mytitle",null,"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
/******sample.php*******/
<head>
<title><?php=$_GET['YourSetTitle']?></title>
<meta http-equiv="Cache-Control" content="max-age=30"/>
<meta http-equiv="content-type" content="text/html" charset="GB2312">
你只能在sample.php静态的指定一个title,如果你用的是脚本的话,你可以试着设一个超全局变量,比如GET 或 SESSION
window.open("sample.php?title=Mytitle",null,"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
/******sample.php*******/
<head>
<title><?php=$_GET['YourSetTitle']?></title>
<meta http-equiv="Cache-Control" content="max-age=30"/>
<meta http-equiv="content-type" content="text/html" charset="GB2312">
解决方案 »
- 日期控件jsp里好用。在js里写的不好用。跪求解决办法。大神们!!!
- 怎么实现栏目随点击变换背景色?
- 急!请教Ext.Grid的Column中的这个是什么东西?帮忙看看。
- javascript nobjid.attributes.getNamedItem('id')
- meizz,关于你的树型结构的问题,请回答一下
- 动态创建表格问题!
- 如何控制每一列的宽度?我是设置第一行各列的宽度,但当其它行的该列中的内容过多时,依然将该行撑宽.如何解决?
- 关于document.form.name.checked = false的问题。
- 如何去掉中文字符串首尾空格
- 献题供解:如何破加密网站,实现图片的“另存为”?
- 请教如何获得页面上的条目数量
- 各位老师帮忙呀,使用JS代码找对象,如果重名只能找到第一个怎么办呀,我晕,帮忙,,
http://www.cfedu.net/ads/pmzx/
aaa=window.open("4.htm");
setTimeout("HB()",1000)
function HB()
{
aaa.document.title="天外水火"
}
</script>
主要问题出在要等到子窗口加载完之后才可以操作,这样的代码最好写在子窗口BODY的onload里,如果非要写在父窗口,就只有上面这样了
win.document.title = "这是标题";
aaa.onload = function(){
aaa.document.title = "天外水火";
}
没办法,我只有在子窗口中加代码了:
document.title=opener.document.title;
这样子窗口获取父窗口的标题做为它的标题就可以了!
这样也可以