function openWindow()
{
var k=confirm("是否需打開網站?");
if(k == true)
var otherurl=prompt("請輸入網站:","http://www.xianlaiwan.cn/");//輸入對話框,默認慕課網址
if(otherurl!="")//打開相應規定網站
window.open(otherurl,"_blank","width=400,height=500,toolbar=no,menu=no");
}
{
var k=confirm("是否需打開網站?");
if(k == true)
var otherurl=prompt("請輸入網站:","http://www.xianlaiwan.cn/");//輸入對話框,默認慕課網址
if(otherurl!="")//打開相應規定網站
window.open(otherurl,"_blank","width=400,height=500,toolbar=no,menu=no");
}
function aa(){
var mywin=window.open("http://www.xianlaiwan.cn","_blank","width=600,height=400,left=0,top=50");
}
<button onclick="aa()">打開</button><br/>
<button onclick="mywin.close()">關閉</button>
var mywin=window.open("http://www.xianlaiwan.cn","_blank","width=600,height=400,left=0,top=50");
}
<button onclick="aa()">打開</button><br/>
<button onclick="mywin.close()">關閉</button>
2016-06-28
function openWindow(){
var xunwen = confirm("確認打開嗎?");
if (xunwen == true)
var xinurl = prompt("請輸入要打開的網址:","http://www.xianlaiwan.cn/");
if (xinurl != "")
window.open(xinurl,'_blank','width=400px,height=500px,menubar=no,toolbar=no');
}
}
}
var xunwen = confirm("確認打開嗎?");
if (xunwen == true)
var xinurl = prompt("請輸入要打開的網址:","http://www.xianlaiwan.cn/");
if (xinurl != "")
window.open(xinurl,'_blank','width=400px,height=500px,menubar=no,toolbar=no');
}
}
}
function openWindow() {
var mywin = confirm("是否打開慕課網?");
if(mywin) {
window.open('http://www.xianlaiwan.cn/','_blank');
}
}
var mywin = confirm("是否打開慕課網?");
if(mywin) {
window.open('http://www.xianlaiwan.cn/','_blank');
}
}
沒有加11行調用函數contxt();提示沒有調用函數;
在瀏覽器中的點擊才調用,加了11行調用函數就自動彈出了這不科學。
在瀏覽器中的點擊才調用,加了11行調用函數就自動彈出了這不科學。
2016-06-28
function openWindow()
{
var isOpen=confirm("是否打開慕課網?")
if (isOpen==true)
{
{
var isOpen=confirm("是否打開慕課網?")
if (isOpen==true)
{
<script type="text/javascript">
document.write("hello");
document.getElementById("p2").style.color="green";
document.getElementById("p1").style.color="red";
嘎嘎?。?!
document.write("hello");
document.getElementById("p2").style.color="green";
document.getElementById("p1").style.color="red";
嘎嘎?。?!
2016-06-27