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