2-7編程練習
function openWindow(){ ? ? ? ?var newWeb = conmpt('是否打開'); ? ? ? ?if(newWeb==true) ? ? ? ?{ ? ? ? ? ? ?window.open('http://www.xianlaiwan.cn','width=400px,height=500px,menubar=no,toolbar=no'); ? ? ? ?}else{ ? ? ? ? ? ?return ''; ? ? ? ?} ? ?} 開始也有點懵,想想怎么去實現吧
2017-06-08
哥們。。。你的代碼寫錯了,不是“conmpt”,是“?confirm”。。。
2017-06-07
把??conmpt 換成?confirm
2017-06-07
這是我的思路:
function openWindow(){
? ?var newWeb = confirm('是否打開');
? ?if(newWeb==true){
? ? ? ?window.open('http://www.xianlaiwan.cn','width=400px,height=500px,menubar=no,toolbar=no');
? ?}else{
? ? ? ?return '';
? ?}
}
openWindow();