zoukankan
html css js c++ java
模式窗口刷新父窗口
模式窗口中点击按钮让父窗口跳转到新的页面,不可用 opener.document.location 方式来设置,只能在父窗口把当前window对象传递到模式窗口,模式窗口使用 dialogArguments 来获得父窗口对象。
父窗口(需要把当前页面window对象传递到模式窗口页面)
<
a
href
="javascript:Openersub('qy.htm');"
>
test
</
a
>
<
script
>
function
Openersub(strUrl)
{
var
vTmd
=
Math.random();
var
vReturn
=
'';
var
strFeature
=
'dialogWidth:530px;dialogHeight:470px;status:
0
;scroll:
1
:
0
;help:
0
;';
if
(strUrl.indexOf('
?
')
>-
1
)
{
vReturn
=
window.showModalDialog(strUrl
+
'
&
tmd
=
'
+
vTmd,window,strFeature);
}
else
{
vReturn
=
window.showModalDialog(strUrl
+
'
?
tmd
=
'
+
vTmd,window,strFeature);
}
}
</
script
>
弹出的模式窗口
<
span
>
确认跳转到新的页面?
<
span
>
<
p
/>
<
input
type
="button"
value
="确定"
onclick
="dialogArguments.location='http://www.baidu.com';window.close()"
>
<
input
type
="button"
value
="关闭"
onclick
="window.close()"
>
查看全文
相关阅读:
ftp卡死问题
Windows 10 安装FileZilla Server
The last packet successfully received from the server was 39,900 milliseconds ago问题解决
java.sql.SQLException: Could not retrieve transaction read-only status from server 问题解决
三主机配置 keepalived VIP高可用
subprocess.Popen在win10下会有异常
python 使用内置方法读取注册表
过年有感
java.security.InvalidKeyException: Illegal key size 解决办法
Android Studio 检查Top Activity
原文地址:https://www.cnblogs.com/suneryong/p/718585.html
最新文章
一个node.js图片上传显示小应用
canvas小图123
html5拖动文件上传
web储存用户信息
一个html5视频播放器
使用模版引擎填充重复dom元素
流水的算法,铁打的损失函数/MLE
1.回归导图
如何离线Windows server 2008R2 激活教程?
对于那些希望能够彻底了解这个世界的人来说,没有什么比数据更有威力了。
热门文章
1.线性回归、Logistic回归、Softmax回归
机器学习算法思维导图总结篇
np.random.seed(0)的作用:作用:使得随机数据可预测。
Python里面的负号的各种神奇用法?来填坑啦
小白如何将代码上传到github上?
记录FTPClient超时处理的相关问题(转)
java ftp retrieveFile 较大文件丢失内容
Mycat1.6启动报NumberFormatException解决方案(server内存太大)
mybatis抛出异常(java.sql.SQLException: Incorrect string value: 'xF0x9Fx92x94' for column 'name' at row 1)
vim insert VISUAL模式无法右键复制问题(转)
Copyright © 2011-2022 走看看