electron 中文文档
2016-04-13 18:36
323 查看
假设有
A.html , B.html
A.html使用js的window.showModalDialog('B.html');
B.html的js里面使用跳转location.href = "http://www.baidu.com";
firefox、chrom 会在弹出框内跳转,IE 会弹出新窗口去显示href的连接
解决方法有两种..
1. location.href = "http://www.baidu.com"; 换成
2.新建一个页面C.html加入iframe连接B.html,那么就可以随意使用跳转
A.html js部分类容:
C.html内容:
本文出自 “Hover_java” 博客,转载请与作者联系!
A.html , B.html
A.html使用js的window.showModalDialog('B.html');
B.html的js里面使用跳转location.href = "http://www.baidu.com";
firefox、chrom 会在弹出框内跳转,IE 会弹出新窗口去显示href的连接
解决方法有两种..
1. location.href = "http://www.baidu.com"; 换成
window.name = "__self"; window.open("http://www.baidu.com" , "__self");
2.新建一个页面C.html加入iframe连接B.html,那么就可以随意使用跳转
A.html js部分类容:
function openWindow(url){ window.showModalDialog(url, null , "dialogWidth=800px;dialogHeight=504px;scroll=0"); location.reload(); }
C.html内容:
<body style="width:800px; height:500px;padding:0px ; margin:0px;" > <iframe frameborder="0" style="width:800px; height:500px" src="b.html"> </iframe> </body>
本文出自 “Hover_java” 博客,转载请与作者联系!
相关文章推荐
- 菜鸡日记001
- iOS中自定义View实现layoutSubviews布局子控件
- sublime text3设置默认编码格式为UTF-8
- 第六周作业
- 文件系统过滤驱动总结
- Vim 自动补全神器-YouCompleteMe
- pycharm调试nodejs代码
- unity生成WP工程后ExtendedSplashImage显示不正确的问题
- JMeter使用指南--转
- 操作系统的基础知识
- CNN 识别图形验证码
- MyBatis动态SQL之 set 和 trim标记的使用示例
- EditText字符的限制:最大输入30个字符或者15个汉字
- phpexcel
- Android SDK Manager无法更新
- Android中SQLite模糊查询方法
- IntelliJ Idea编译报错:请使用 -source 7 或更高版本以启用 diamond 运算符
- oncontextmenu简单使用方法,以及在js函数中失效的问题
- yarn
- 内核缓冲区