function openWindow()
{ var a=confirm("確定打開?");
if(a==true){
var b=prompt("輸入網址","http://www.imooc.co")
if(b=="http://www.imooc.co")
{window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500,menubar=no,toolar=no');
}
}
}
{ var a=confirm("確定打開?");
if(a==true){
var b=prompt("輸入網址","http://www.imooc.co")
if(b=="http://www.imooc.co")
{window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500,menubar=no,toolar=no');
}
}
}
function openWindow(){
var open=confirm("open/No");
if(open){
var httpWindow=prompt("please input http:", "http://www.xianlaiwan.cn");
if(httpWindow){
window.open(httpWindow,"_blank","width=400px,height=500px,menubar=no,tolbar=no");
}
}
}
var open=confirm("open/No");
if(open){
var httpWindow=prompt("please input http:", "http://www.xianlaiwan.cn");
if(httpWindow){
window.open(httpWindow,"_blank","width=400px,height=500px,menubar=no,tolbar=no");
}
}
}
不明白的同學看這里:
輸出null是因為頁面還沒加載,就想去獲取id了,但那個時候id是不存在的.解決方法有1:把script放在id定義的后面,
2.在函數外面再套一個函數:window.onload=function (){}
輸出null是因為頁面還沒加載,就想去獲取id了,但那個時候id是不存在的.解決方法有1:把script放在id定義的后面,
2.在函數外面再套一個函數:window.onload=function (){}
2016-01-26
/**/實在是蛋疼啊.我打注釋一半都是ctrl+/.如果是VS的話就是ctrl+k+c(還是u來著,反正一個是注釋一個是取消).他怎么打就怎么打,我才不會刻意去/**/.如果是一行的直接手動//,/**/這個太少用到了
2016-01-26