js 调用父窗口的方法
来源:互联网 发布:软件项目立项 编辑:程序博客网 时间:2024/05/19 18:44
opener.show();
父窗体需要顶一个show() 方法
父面页代码:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD LEVEL1//EN"><html> <head> <title>html.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> </head> <body> <div><button id="btn">open new page</button></div><script>window.onload=function(){var btn = document.getElementById("btn");btn.onclick = openPage;function openPage(){try {window.open('newpage.html'); }catch(e){alert(e);}//alert("ok");}}function show(){document.title=new Date();}</script> </body></html>newpage.html 代码 需要打开的页面
<!DOCTYPE HTML PUBLIC "-//IETF//DTD LEVEL1//EN"><html> <head> <title>newpage.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> </head> <body> <button id="btn" onclick="fun()">单击</button><script>function fun(){opener.show();}</script> </body></html>
- js 调用父窗口的方法
- js 怎样从子窗口调用父窗口的方法
- JS子窗口调用父窗口的方法
- 调用父窗口js方法
- js 调用父窗口函数-iframe父窗口和子窗口相互的调用方法
- js jquery父窗口调用子窗口中的方法和子窗口调用父窗口里的方法
- js调用父窗口(父页面)的方法
- JS实现关闭当前子窗口,刷新父窗口及调用父窗口的方法
- JS实现关闭当前子窗口,刷新父窗口及调用父窗口的方法
- javascript(js)iframe里的页面调用父窗口js函数的方法或弹出窗口调用父窗口js函数的方法
- iframe里面的页面调用父窗口,左右窗口js函数的方法
- iframe里面的页面调用父窗口,左右窗口js函数的方法
- iframe里面的页面调用父窗口,左右窗口js函数的方法
- iframe里面的页面调用父窗口,左右窗口js函数的方法
- iframe里面的页面调用父窗口,左右窗口js函数的方法
- iframe里面的页面调用父窗口,左右窗口js函数的方法
- iframe里面的页面调用父窗口,左右窗口js函数的方法
- iframe里面的页面调用父窗口,左右窗口js函数的方法
- 二叉树遍历
- mysql字符集设定总结
- ubuntu 之is not in the sudoers file
- iOS开发流程总结
- 13省赛及上一阶段(大一)总结
- js 调用父窗口的方法
- 题目1431:Sort
- 50% to be that 25%
- java单例模式
- 如何在jsp页面上显示文章
- 文件空洞
- ext4.1动态生成多个checkboxgroup(或者radiogroup),并且有toolbar操作、
- java基础常识
- 实数和字符在计算机中的存储方式