這一題為什么會彈窗?課程2-6
可為什么會彈窗?。克皇嵌x了mywin,又沒有調(diào)用啊。
==============================================================
可這么說的話,為什么這個(gè)不會敲一個(gè)代碼彈一個(gè)窗口呢?里面也有window.open呀
我的問題是在什么情況下window.open會直接奏效,而什么時(shí)候不會呢?(見課程2-5)
<script?type="text/javascript"> /*window.open*/ function?Wopen(){ ?????window.open('http://idcbgp.cn','_blank','width=600px,height=400px,top:100px,menubar=no,toolbar=no,?status=no,scrollbars=yes'); ????/*menubar:菜單欄?toobar:工具欄?status:狀態(tài)欄*/ ??}? </script>
2016-09-25
我的理解是如果你換成var mywin = 1 + 1;mywin就會被立即被賦值2,所以相同的窗口也會立即彈出。
2016-09-16
<!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>無標(biāo)題文檔</title>
<script type="text/javascript">
? function Wopen(){
? ? ?window.open('http://idcbgp.cn','_self','width=100','height=400','top=200','left=100')?
window.close();
? }?
</script>
</head>
<body>
? ? <input name="button" type="button" onClick="Wopen()" value="點(diǎn)擊我,打開新窗口!" / >
</body>
</html>
2016-09-03
?window.open未放在函數(shù)中即可立即生效。函數(shù)體所包含的命令只有調(diào)用函數(shù)時(shí)才會執(zhí)行。
2016-09-03
如果你的script里沒有寫
Wopen();
就不會彈窗
這個(gè)的意思是立即執(zhí)行。
2016-09-03
confirm 是彈出對話框 ?window.open() 是彈出 新窗口(html頁面)
2016-09-03
window.open是打開窗口??!可以彈窗了,默認(rèn)是彈出新窗口的