<script type="text/javascript"> ?? ?function openWindow()? ?{var mychar=confirm("確定要打開新窗口嗎?");? ? if (mychar==true)// 新窗口打開時(shí)彈出確認(rèn)框,是否打開? ?{prompt("請(qǐng)輸入一個(gè)網(wǎng)址","http://idcbgp.cn/");// 通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/? ?window.open=('http://idcbgp.cn/','_blank','width=400, height=500, menubar=no,toolbar=no');//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。? ?}? }? </script>?這樣子正確嗎?
2-7編程練習(xí)
妞妞琳達(dá)
2016-09-08 11:16:29