window對象 為什么我這個沒出來效果????
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window對象</title>
<script type="text/javascript">
? alert("歡迎大家來我家玩");
??? function wow(){
??????? window.open(http://idcbgp.cn,width=400px,height=300px);
??? } ?
</script>
</head>
<body>
<form>
<input type="button" onClick="wow()" value="點擊我,打開新窗口"? />
</form>
</body>
</html>
2016-07-22
open方法里的參數(shù)是字符串類型,所以要加上雙引號或者單引號。像這種要輸網(wǎng)址的,不管三七二十一先弄個引號在寫地址。保證沒錯!
2016-07-22
?window.open('http://idcbgp.cn','width=400px,height=300px');? 加上' ? '