lllmh
2018-07-31 16:34
<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
var openWindow=function(){
var my = confirm ("allow alert new window?")
if (my == true)
{
window.open('https://www.imooc.com/','_blank','weight=400,height=500')
}
else{
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>
if(open) {
window.open('http://www.imooc.com/', width=400, height=500, toolbar=no, menubar=no)
}
试试这样 右边会有新打开的窗口 而且是width height
能打开https://www.imooc.com/code/这个网站呀
JavaScript入门篇
741024 学习 · 9681 问题
相似问题