window对象方法(open和close)
2021-01-22 18:12
标签:back tool rip cal scrollbar menu 滚动条 body 一个 window对象方法(open和close) 标签:back tool rip cal scrollbar menu 滚动条 body 一个 原文地址:https://www.cnblogs.com/vinson-blog/p/12077464.htmlDOCTYPE html>
html lang="en">
head>
meta charset="UTF-8">
meta name="viewport" content="width=device-width, initial-scale=1.0">
meta http-equiv="X-UA-Compatible" content="ie=edge">
title>window对象方法(open和close)title>
head>
body>
input id="op" type="button" value="打开">
input id="cl" type="button" value="退出">
script>
var op=document.getElementById("op");
var cl=document.getElementById("cl");
op.onclick=function (){
window.open("https://www.baidu.com/","百度一下,你就知道","width=300,height=250,left=0,top=0,toolbar=no,menubar=no,scrollbars=no,location=no,status=no")
}
cl.onclick=function (){
window.chose();//关闭窗口
}
script>
body>
html>