var cms="<SCRIPt>alert(window.dialogArguments);alert(window.dialogArguments.kkk.value)<\/script>" window.showModalDialog("about:"+cms,window,"dialogWidth:300px;dialogHeight:300px;help:no;resizable:no;status:no;scroll:yes;") cms"about:"+cms不是已经写入到showModalDialog窗口里了吗??
var cms="<SCRIPt>alert(window.dialogArguments);alert(window.dialogArguments.kkk.value)<\/script>" window.showModalDialog("about:"+cms,window,"dialogWidth:300px;dialogHeight:300px;help:no;resizable:no;status:no;scroll:yes;") cms"about:"+cms不是已经写入到showModalDialog窗口里了吗??
window.showModalDialog("about:"+cms,window,"dialogWidth:300px;dialogHeight:300px;help:no;resizable:no;status:no;scroll:yes;")
cms"about:"+cms不是已经写入到showModalDialog窗口里了吗??
window.showModalDialog("about:"+cms,window,"dialogWidth:300px;dialogHeight:300px;help:no;resizable:no;status:no;scroll:yes;")
cms"about:"+cms不是已经写入到showModalDialog窗口里了吗??
显示找不到页面!!!
是不是about:.....不很稳定呀!!不增加新页面,有什么好办法解决
直接参数传,使用cookie
是动态的使用cookie达不到效果
function winopen(){
var cms="<SCRIPt>alert(window.dialogArguments);alert(window.dialogArguments.kkk.value)<\/script>"
window.showModalDialog("about:"+cms,window,"dialogWidth:300px;dialogHeight:300px;help:no;resizable:no;status:no;scroll:yes;")
}
</script>
<input id="kkk" type=button onclick="javascript:winopen()" value="open">楼主,你这一页也是用模态窗口打开的么
如果不是,它怎么会有window.dialogArguments
window.dialogArguments是对用模态窗口打开的网页才有的
你把这一句
window.showModalDialog("about:"+cms,window,"dialogWidth:300px;dialogHeight:300px;help:no;resizable:no;status:no;scroll:yes;")
中的"about:"+cms改为一个网页地址,在那一页中使用dialogArguments就没有问题了
而且一般使用的时候有个变量获得它的值如:obj=dialogArguments;
这样的写法我个人最为推崇
我只见过在网页中写iframe的,就是iframe没有填写src,使用代码直接写入iframe的。
而这样就没有文件名了,所以在用模态窗口时,没发调用。
你可以去MSDN上问问,看谁有高招。
如果问到了,请告诉我一声。
直接写入代码的???深渊
<script language=javascript>
document.frames("id").document.write("sdfsdf");
</script>
<iframe id=if1></iframe>
不知道是否可以为你提供灵感
要是你有解决办法记得给我发一份
调用
/***************************************************/var dialogObject = new Object();dialogObject.Title = "增加方案"; dialogObject.SourceUrl ="/cgi-bin/tt.cgi"
dialogObject.SourceUrl+= "?date="+ new Date();var ret=false;
ret=window.showModalDialog("/dialogHTML.htm", dialogObject, "dialogWidth:470px; dialogHeight:330px; center:yes; help:no; resizable:no; status:no") ;
if(ret)
{
location.reload();
}
/***************************************************/
dialoghtml 网页
/***************************************************/
<script language="jscript">var myTitle = window.dialogArguments;
if(myTitle!=null)
document.title = myTitle.Title+genString(" ", 200);
function bodyOnLoad() {
var objDialogArgs = window.dialogArguments ;
try {
window.document.all("iframeid").setAttribute("src", objDialogArgs.SourceUrl ) ;
}
catch(e) {
alert("Error displaying dialog!\n" + e.message) ;
}
}</script>
<link rel="stylesheet" type="text/css" href="/css/main.css"> </head>
<body onload="jscript: bodyOnLoad();" >
<div style="padding-top: 0px;">
<iframe class="dialogContent" id="iframeid" noresize frameborder="0" src="" tabindex="-1"></iframe>
</div>
</body>
</html>