为了账号安全,请及时绑定邮箱和手机立即绑定

求救!帮忙看一下吧,已经不行了

<!DOCTYPE html>

<html>

 <head>

  <title> new document </title>  

  <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>   

  <script type="text/javascript">  

    function openWindows(){

    var open=confirm("open or not");

if(open==true)

{var url=prompt("is this address?","http;//www.imooc.com");

if(url !=null)

{window.open(url,"_blank,",'width=600px,height=400px,menubar=no,toolbar=no');

}

else{alert("see you again");

}

else{alert("see you");}

}

  </script> 

 </head> 

 <body> 

 <input type="button" value="新窗口打开网站" onclick="openWindow()" /> 

 </body>

</html>


正在回答

3 回答

复制那么一大蛋子代码有什么用?把关键地方代码复制过来就行了,看着烦

0 回复 有任何疑惑可以回复我~

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>无标题文档</title>

<script type="text/javascript">  

    function openWindow(){

    var open=confirm("open or not");

if(open==true){

var url=prompt("is this address?","http;//www.imooc.com");

if(url !=null){

window.open(url,"_blank,",'width=600px,height=400px,menubar=no,toolbar=no');

}

else{

alert("see you again");

}

}

else{

alert("see you");

}

}

  </script> 

</head>


<body>

<input type="button" value="新窗口打开网站" onclick="openWindow()" /> 

</body>

</html>


0 回复 有任何疑惑可以回复我~
<!DOCTYPE html>
<html>

	<head>
		<title> new document </title>
		<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
		<script type="text/javascript">
			function openWindows(){
			    var open=confirm("open or not");
				if(open==true){
					var url=prompt("is this address?","http;//www.imooc.com");
					if(url !=null){
						window.open(url,"_blank,",'width=600px,height=400px,menubar=no,toolbar=no');
					}else{
						alert("see you");
						alert("see you again");
					}
				}
			}
		</script>
	</head>

	<body>
		<input type="button" value="新窗口打开网站" onclick="openWindows()" />
	</body>

</html>

哥们,工欲善其事,必先利其器!刚学吗?HBuilder,给你推荐个开发平台。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

求救!帮忙看一下吧,已经不行了

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信