如果把var mychar = document.getElementById("con")挪到function前面為什么就不起作用了呢? 求解釋
2016-06-02
function openWindow(){
var choice=confirm("是否打開");
if(choice==true){
var url=prompt("輸入網址","http://www.xianlaiwan.cn/");
window.open('width=400px,height=500px,menubar=no,toolbar=no');
}
}
var choice=confirm("是否打開");
if(choice==true){
var url=prompt("輸入網址","http://www.xianlaiwan.cn/");
window.open('width=400px,height=500px,menubar=no,toolbar=no');
}
}
試了下后面加上
document.write(mynum);
可以輸出賦值給mynum的文字O(∩_∩)O~~
document.write(mynum);
可以輸出賦值給mynum的文字O(∩_∩)O~~
2016-06-02