8-1 什么窗口大小設(shè)置無效
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window對象</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="點擊我,打開新窗口"? 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("歡迎來到慕課網(wǎng)");
}
</script>
你應(yīng)該把彈出的窗口進行定位_blank:在新窗口顯示目標(biāo)網(wǎng)頁",_self:在當(dāng)前窗口顯示目標(biāo)網(wǎng)頁,_top:框架網(wǎng)頁中在上部窗口中顯示目標(biāo)網(wǎng)頁
2018-10-12
因為你少了一個參數(shù),高度寬度這代碼因為少了第2個參數(shù)跑到第2的位置了
?window.open('https://www.baidu.com',,'width=600,height=400,menubar=no,toolbar=no');這樣就好了