欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

js 調(diào)用父窗口的具體實現(xiàn)代碼

 更新時間:2013年07月15日 18:06:35   作者:  
想要實現(xiàn)如題所示:父窗體需要頂一個show()方法,具體實現(xiàn)代碼如下,感興趣的朋友可以參考下哈,希望對大家有所幫助
opener.show();
父窗體需要頂一個show() 方法
父面頁代碼:
復(fù)制代碼 代碼如下:

<!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 代碼 需要打開的頁面
復(fù)制代碼 代碼如下:

<!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>

相關(guān)文章

最新評論