最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

window.close無(wú)法關(guān)閉新頁(yè)面。代碼如下

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>無(wú)標(biāo)題文檔</title>

<script type="text/javascript">

function Wopen(){

window.open('http://www.baidu.com','_blank','height=400,width=600,top=100dp,left=0dp');

window.close();

}

</script>

</head>


<body>

<input name="button" type="button" onClick="Wopen()" value="點(diǎn)擊我,打開(kāi)新窗口!" / >

</body>

</html>


正在回答

2 回答

你這樣關(guān)閉的是你原來(lái)的那個(gè)頁(yè)面, 你應(yīng)該關(guān)閉的是你打開(kāi)的那個(gè)頁(yè)面的對(duì)象

var mychar =window.open('http://www.baidu.com','_blank','height=400,width=600,top=100dp,left=0dp');

mychar.close();

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

champion666 提問(wèn)者

請(qǐng)問(wèn),如果要在代碼中添加一行,頁(yè)面延遲3秒關(guān)閉。那代碼該如何寫?
2016-12-19 回復(fù) 有任何疑惑可以回復(fù)我~

<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>close()</title>

? <script type="text/javascript">

? ? ?var mywin=window.open("http://yifanck.cn");

? ? ?setInterval(function(){

? ? ? ? ?mywin.close();

? ? ? ? ?},3000);

? ? ? ??

? </script>

</head>

<body>

</body>

</html>


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

window.close無(wú)法關(guān)閉新頁(yè)面。代碼如下

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)