想要实现如题所示:父窗体需要顶一个show()方法
具体实现代码如下
感兴趣的朋友可以参考下哈
希望对大家有所帮助
openershow();
父窗体需要顶一个show() 方法
父面页代码
复制代码 代码如下:
<!DOCTYPE HTML PUBLIC "
//IETF//DTD LEVEL
//EN">
<html>
<head>
<title>html
html</title>
<meta http
equiv="keywords" content="keyword
keyword
keyword
">
<meta http
equiv="description" content="this is my page">
<meta http
equiv="content
type" content="text/html; charset=UTF
">
<!
<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>
newpagehtml 代码 需要打开的页面
复制代码 代码如下:
<!DOCTYPE HTML PUBLIC "//IETF//DTD LEVEL//EN">
<html>
<head>
<title>newpagehtml</title>
<meta httpequiv="keywords" content="keywordkeywordkeyword">
<meta httpequiv="description" content="this is my page">
<meta httpequiv="contenttype" content="text/html; charset=UTF">
<!<link rel="stylesheet" type="text/css" href="/stylescss">>
</head>
<body>
<button id="btn" onclick="fun()">单击</button>
<script>
function fun(){
openershow();
}
</script>
</body>
</html>