8-1 什么窗口大小設(shè)置無(wú)效
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window對(duì)象</title>
<script type="text/javascript">
?function openwindow(){
? ? ?window.open('https://www.baidu.com','width=600,height=400,menubar=no,toolbar=no');
?}
</script>
</head>
<body>
<form>
<input type="button" value="點(diǎn)擊我,打開(kāi)新窗口"? onclick="openwindow()" />
</form>
</body>
</html>
2019-05-24
<script type="text/javascript">
function dj(){
? ? window.open("http://idcbgp.cn","_blank","width=600px,height=400px").alert("歡迎來(lái)到慕課網(wǎng)");
}
</script>
你應(yīng)該把彈出的窗口進(jìn)行定位_blank:在新窗口顯示目標(biāo)網(wǎng)頁(yè)",_self:在當(dāng)前窗口顯示目標(biāo)網(wǎng)頁(yè),_top:框架網(wǎng)頁(yè)中在上部窗口中顯示目標(biāo)網(wǎng)頁(yè)
2018-10-12
因?yàn)槟闵倭艘粋€(gè)參數(shù),高度寬度這代碼因?yàn)樯倭说?個(gè)參數(shù)跑到第2的位置了
?window.open('https://www.baidu.com',,'width=600,height=400,menubar=no,toolbar=no');這樣就好了