語法 window.open("地址")
功能:打開一個新的窗口
這個新窗口是可以進行設置的
width:窗口寬度 heght:高度 left:窗口x軸坐標 top:窗口y坐標
toolbar:是否顯示瀏覽器工具欄 menubar:是否顯示菜單欄
scrollbars:是否顯示滾動條 location:是否顯示地址字段
status:是否添加狀態欄
語法:
<input type="button" name="" value="打開頁面">
<script>
var a=document.getElementsByTagName("input")[0];
a.onclick=function(){
var b=confirm("是否打開頁面?")
if (b==true){
window.open('99.html','九九乘法表','width=300,height=300,location=no,menubar=no,scrollbars=no,status=no')
}else {
window.close();
}
}
</script>
