8-1 什么窗口大小設置無效
<!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://www.xianlaiwan.cn","_blank","width=600px,height=400px").alert("歡迎來到慕課網");
}
</script>
你應該把彈出的窗口進行定位_blank:在新窗口顯示目標網頁",_self:在當前窗口顯示目標網頁,_top:框架網頁中在上部窗口中顯示目標網頁
2018-10-12
因為你少了一個參數,高度寬度這代碼因為少了第2個參數跑到第2的位置了
?window.open('https://www.baidu.com',,'width=600,height=400,menubar=no,toolbar=no');這樣就好了