没有太明白你的意思。
不过showModalDialog 的窗口确实不能在自身打开一个新的窗口。有时候问题解决不了,应该想想,是不是解决问题的思路不对。不好意思,帮不了你,只能说说我的想法
不过showModalDialog 的窗口确实不能在自身打开一个新的窗口。有时候问题解决不了,应该想想,是不是解决问题的思路不对。不好意思,帮不了你,只能说说我的想法
解决方案 »
- 怎么用js判断页面是否为第一次打开,如果不是则不调用相关js的function函数
- java解析json数据
- 单选按钮为什么不能选?
- 大家帮忙看看, 这个JS哪里有问题, 为什么不能增加列?
- 建了个技术群,拉淫啦,淫淫有粪....[处女主任]
- easyui如何在accordion里面生成tree
- 请问?WINDOW窗口问题
- 属性:list-style-type有什么作用,一般在什么情况下使用?
- 高分请教.如何让鼠标在一个表格里面不能实现点击呢?急用...
- javaScript中如何判断一页中是否有数据?用于没有数据禁止按“打印”按钮。
- 关于字符比较的问题,急求助,谢谢.在线急等!
- 为什么广告它不移动?
在b.htm的head里加上这句:
<base target="_self"/>方法2:
在这个页面的外面套一个iframe
a.htm:
--------------------------
functoin testFun()
{
var DialogArgument=new Array();
DialogArgument["src"]=homeUrl+"b.htm";
DialogArgument["title"]="b.htmTitle";
var a=showModalDialog("DialogFrame.htm",DialogArgument,"status:no;resizable:no;help:no;dialogHeight:350px;dialogWidth:600px;");
alert("return value is "+a);
}
DialogFrame.htm
--------------------------
<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>
<title>Dialog</title>
</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>
b.htm;c.htm
--------------------------
function OkFun()
{
top.returnValue="OK";
top.close();}