function openWindow(){
var html=confirm(是否打開網頁?);// 新窗口打開時彈出確認框,是否打開
if(html==true)
{
window.open('http//www.xianlaiwan.cn','_html','height=500,width=400,menubar=no,toolbar=no');// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
} //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
}
var html=confirm(是否打開網頁?);// 新窗口打開時彈出確認框,是否打開
if(html==true)
{
window.open('http//www.xianlaiwan.cn','_html','height=500,width=400,menubar=no,toolbar=no');// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
} //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
}
function openWindow()
{
var myconfirm=confirm('是否確認打開網頁?');if(myconfirm=true)
{var myquestion=prompt("請輸入你想要打開的網址"," http://www.xianlaiwan.cn/");if(myquestion=true)
{window.open(myquestion,"_blank","width:400px,height:500px,menubar=no,toolbar=no,scrollbars=yes");} } }
{
var myconfirm=confirm('是否確認打開網頁?');if(myconfirm=true)
{var myquestion=prompt("請輸入你想要打開的網址"," http://www.xianlaiwan.cn/");if(myquestion=true)
{window.open(myquestion,"_blank","width:400px,height:500px,menubar=no,toolbar=no,scrollbars=yes");} } }
function openWindow(){
var myopen = confirm("窗口是否打開");
if(myopen){
keopen = prompt("ss","http://www.xianlaiwan.cn/")
if(keopen) window.open("keopen","_blank","width=400,height=500,menubar=no,toolbar=no")
else alert("您取消了打開網頁!");
}
else alert("您取消了打開網頁");
}
var myopen = confirm("窗口是否打開");
if(myopen){
keopen = prompt("ss","http://www.xianlaiwan.cn/")
if(keopen) window.open("keopen","_blank","width=400,height=500,menubar=no,toolbar=no")
else alert("您取消了打開網頁!");
}
else alert("您取消了打開網頁");
}
function displayContent(){
var ooobj = document.getElementById("txt");
ooobj.style.display = "block";
}
var ooobj = document.getElementById("txt");
ooobj.style.display = "block";
}
var mychar=document.getElementById("con");
document.write("結果:"+mychar.innerHTML);
document.write("結果:"+mychar.innerHTML);
2016-05-07
...........這驗證機制好奇怪...自己練寫代碼,下面的onclick參數值只能寫原來默認的,不管你自己上面設置的是什么函數名,,,,害我查半天查不到自己出錯在哪。
2016-05-06