為啥這樣不行,求指教?必須要用prompt彈出來嗎?
?<script type="text/javascript"> ?
? ? function openW()
? ? var message=confirm("是否打開窗口?");
? ? if
? ? (
? ? ? ? message==true)
? ? ? ? {
? ? ? ? window.open("http://idcbgp.cn/",'_blank','width=400px,height=500px,menubar=no,tollbar=no');
? ? ? ? }
? ? else
? ? {
? ? ? ? alert("goodbye");
? ? }
? </script>?
2015-08-30
if里面可以不加 == true判斷,js默認(rèn)的if里面不加條件即為true
2015-08-30
格式都錯(cuò)了。。。。。。。