已采納回答 / 玄眾妙
用var定義變量名字是方便后面需要時好調用。var mychar=document.getElementById("con");的意義是給document.getElementById("con")變量取個名字,好在后面需要調用document.getElementById("con")時可以直接使用mychar來替代document.getElementById("con"),這樣就會節省很多工作量,也方便閱讀了。
2019-05-26
已采納回答 / 繆繆繆
window.open('http://xyq.cbg.163.com,_blank')你這里中間少了兩個單引號應該是window.open('http://xyq.cbg.163.com','_blank')而且開的窗口的樣式沒有寫
2019-05-23
已采納回答 / document_Byid
點擊5的 var myde =confirm("")的myde 和上面的document.getElementById(‘con’)重復了,換成這個就可以了function dianji5(){var con = confirm("是否恢復默認值?");if(con==true){?? ?wwe.className ="div1"}else{?? ?}
2019-05-22
已采納回答 / hermit1997
只要全部定義成原來的設定值就好了,代碼如下://定義"取消設置"的函數? ? function cancel(){? ? ? ? var ac1=confirm("是否確認取消設置?");? ? ? ? if(ac1==true){? ? ? ? ? ? contxt.style.color="black";? ? ? ? ? ? contxt.style.backgroundColor="white";? ? ? ? ? ? title.style.color="black";? ? ? ? ? ? t...
2019-05-21
已采納回答 / 灼淺
你的這句 var txt=getElementById("txt");中間少了一個document,應該是var txt=document.getElementById("txt");才對哦。
2019-05-18
已采納回答 / 慕標2283219
??? function openWindow()??? {??????? if ( confirm("將打開新對話框") == true)??????? {?????????? var? newWin = prompt("輸入要打開的網址,默認是126","http://www.126.com/");??????????? window.open(newWin , '_blank' ,'width=400,height=500,menubar=no,toolbar=no');??????? }?????...
2019-05-18
已采納回答 / PandaQ
function openWindow(){? ? ? var open=confirm("是否打開新窗口?");? ? ? if(open==true){? ? ? ? ? // 新窗口打開時彈出確認框,是否打開? ? ? ? ? var url=prompt("通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn"); ?// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/? ? ? ? ? if(url!=null){? ? ? ? ?...
2019-05-13