第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

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

為什么我把關(guān)閉放在按鈕函數(shù)里面實(shí)現(xiàn)不了關(guān)閉網(wǎng)頁(yè)

<!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://idcbgp.cn");

?function myclose()

?{

? ? ?mywin.close();

?}

? </script>

</head>

<body>

? ? <input name="button" type="button" onClick="myclose()" value="close">

</body>

</html>


正在回答

4 回答

這個(gè)是因?yàn)槟闶褂玫氖蔷W(wǎng)頁(yè)內(nèi)嵌的工具關(guān)閉的網(wǎng)頁(yè),你把程序復(fù)制到外面創(chuàng)建一個(gè)html的文件打開就可以了。

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

可以試試這樣:

<!doctype html>

?<html>

????<meta charset="utf-8">

????<title>close()</title>

? ? <script>

????????????var str=window.open('http://www.baidu.com','_blank','width=400,height=200,top=100,left=100')

????????????????????????function rec(){

????????????????????????????????????????????var str1=confirm("是否退出該網(wǎng)址");

????????????????????????????????????????????if(str1==true){

????????????????????????????????????????????????????????????str.close();

????????????????????????????????????????????????????????}

????????????????????????????????}

? ? ? </script>

? ? ? <body>

????????????????<p>

??????????????????????<input type="button" name="button" value="click" onclick="rec()">

????????????????</p>

? ? ? </body>

</html>

????????????

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

function rec_4(){

??? var str = window.open('https://www.baidu.com/','_blank','window=300,height=200,left=0,top=100')

??? var str_1 = confirm("網(wǎng)址不安全是否退出")

??? if(str_1==true){

??????? str.close()

??? }

??? else{

??????? window.open('https://www.baidu.com/','_blank','window=300,height=200,left=0,top=100')

??? }

}


<input type="button" name="type" value="點(diǎn)擊4" onclick="rec_4()">

你可以試試這樣,

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

慕圣2435191

你這樣也關(guān)不掉頁(yè)面啊,只能重新打開頁(yè)面
2019-07-11 回復(fù) 有任何疑惑可以回復(fù)我~

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

?function myclose()

?{

? ? ?mywin.close();

?}

改為:

?function myclose()

?{

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

? ? mywin.close();

?}


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

Erinnn 提問者

這樣會(huì)打開兩個(gè)誒 而且都關(guān)不掉 這是為什么嗚嗚嗚
2019-06-22 回復(fù) 有任何疑惑可以回復(fù)我~
#2

慕斯7301573 回復(fù) Erinnn 提問者

實(shí)測(cè)這兩種方法都是可行的,改前是 先打開調(diào)用方法的時(shí)候再關(guān)閉 改后是 打開就關(guān)閉 窗口會(huì)閃一下
2019-06-22 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

為什么我把關(guān)閉放在按鈕函數(shù)里面實(shí)現(xiàn)不了關(guān)閉網(wǎng)頁(yè)

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

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

幫助反饋 APP下載

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

公眾號(hào)

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