大问题啊!!!搞定立刻给分,关于模式窗口的

kendison 2002-12-27 11:36:36
1.htm
<script>
function a()
{
window.showModalDialog("2.htm",window,"")
}
</script>
<input type="button" onclick="a()">

2.htm
<head>
<title>haha</title>
</head>
<frameset>
<frame src="3.htm">
</frameset>

3.htm
<script>
function a()
{
//alert(parent.document.title);
parent.document.title="hoho";
}
</script>
<input type="button" onclick="a()">

我有以上3个文件,我想在1.htm或3.htm里改变2.htm的title,有什么办法?
...全文
77 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
saucer 2002-12-27
  • 打赏
  • 举报
回复
not possible, it is a well-known bug

BUG: DHTML Dialog Box Does Not Show String Assigned to Document.Title
http://support.microsoft.com/default.aspx?scid=KB;EN-US;263033
孟子E章 2002-12-27
  • 打赏
  • 举报
回复
1.htm
<script>
function a()
{
window.showModalDialog("2.htm","AAAAAAAAA","")
}
</script>
<input type="button" onclick="a()">

2.htm
<head>
<title>haha</title>
<script>
document.title=window.dialogArguments;
</script>
</head>
<frameset>
<frame src="3.htm">
</frameset>

孟子E章 2002-12-27
  • 打赏
  • 举报
回复
1.htm
<script>
function a()
{
window.showModalDialog("2.htm","AAAAAAAAA","")
}
</script>
<input type="button" onclick="a()">

2.htm
<head>
<title>haha</title>
</head>
<frameset onload="document.title=window.dialogArguments">
<frame src="3.htm">
</frameset>

在3里没有办法更改
kendison 2002-12-27
  • 打赏
  • 举报
回复
parent.dialogArguments.document.title="hoho";
这个只能改到1.htm的title哦,现在我想要改变2.htm的title
我用alert(parent.document.title);可以显示到
不过用parent.document.title="hoho";不有反应
saucer 2002-12-27
  • 打赏
  • 举报
回复
try

parent.dialogArguments.document.title="hoho";
kendison 2002-12-27
  • 打赏
  • 举报
回复
哦,bug,那只好在1里传递过去罗,ths

87,993

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧