function openwindow(){
var k_open;
var temp=confirm("是否打開新的網址?")
if (temp){k_open=prompt("請輸入你的網址:","http://www.xianlaiwan.cn/")//通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
window.open(k_open,"_blank","width=400,height=500,menubar=no,toolbar=no")}
openwindow()
var k_open;
var temp=confirm("是否打開新的網址?")
if (temp){k_open=prompt("請輸入你的網址:","http://www.xianlaiwan.cn/")//通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
window.open(k_open,"_blank","width=400,height=500,menubar=no,toolbar=no")}
openwindow()
var mystr="我一周內會";
var mychar="找到自己滿意的";
document.write(mystr+"<br>");
document.write(mystr+mychar+"工作!!")
var mychar="找到自己滿意的";
document.write(mystr+"<br>");
document.write(mystr+mychar+"工作!!")
2016-06-29
<body>
<input name="button" type="button" onClick="rec()" value="點擊我,彈出對話框" />
</body>
<input name="button" type="button" onClick="rec()" value="點擊我,彈出對話框" />
</body>
2016-06-29
function openWindow(){
var smallwindow=confirm("確定新窗口打開網站?")
if(smallwindow==true){
var url=prompt ("輸入網址","http://wwww.xianlaiwan.cn/");
window.open(url,'width=400px,height=500p,menubar=no,toolbar=no,');
}
else
{alert("滾粗!")}
var smallwindow=confirm("確定新窗口打開網站?")
if(smallwindow==true){
var url=prompt ("輸入網址","http://wwww.xianlaiwan.cn/");
window.open(url,'width=400px,height=500p,menubar=no,toolbar=no,');
}
else
{alert("滾粗!")}
這樣寫不就行了嗎
//定義"取消設置"的函數
function restore() {
if(confirm("恢復為原始樣式?")) {
obj.style="";
}
}
//定義"取消設置"的函數
function restore() {
if(confirm("恢復為原始樣式?")) {
obj.style="";
}
}