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

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

請(qǐng)問(wèn)如何實(shí)現(xiàn)一次點(diǎn)擊打開多個(gè)窗口呢?

我覺得調(diào)用兩次window.open()就行了,可是點(diǎn)擊運(yùn)行之后,之打開了第一個(gè)窗口

function open_win() {

window.open("https://c.runoob.com/","new");

window.open("http://www.runoob.com/","new1");

}


正在回答

2 回答

可以使用addEventListener為一個(gè)事件綁定多個(gè)響應(yīng)函數(shù)
<!DOCTYPE?HTML>
<html>
????<head>
????????<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
????????<title>window.open</title>
????????<script?type="text/javascript">?	
????????????window.onload?=?function(){	
????????????????var?input?=?document.getElementsByTagName("input")[0];		
????????????????input.addEventListener("click",function(){window.open("https://c.runoob.com/","new");},false);		
????????????????input.addEventListener("click",function(){window.open("http://www.runoob.com/","new1");},false);	
????????????????}??
?????????</script>
?????</head>
?????<body>????
?????????<input?name="button"?type="button"?value="點(diǎn)擊我,打開新窗口!"?/?>
?????</body>
</html>


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

點(diǎn)擊一個(gè)按鈕只能打開一個(gè)窗口

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

舉報(bào)

0/150
提交
取消

請(qǐng)問(wèn)如何實(shí)現(xiàn)一次點(diǎn)擊打開多個(gè)窗口呢?

我要回答 關(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)