<script type="text/javascript">
function rec(){
var mymessage=confirm("你覺得我帥嗎?");
if(mymessage==true)
{
alert("嗯,我也覺得!");
}
else
{
alert("小孩子不要說謊啦!");
}
}
</script>
function rec(){
var mymessage=confirm("你覺得我帥嗎?");
if(mymessage==true)
{
alert("嗯,我也覺得!");
}
else
{
alert("小孩子不要說謊啦!");
}
}
</script>
2016-06-08
var myweb = confirm("是否打開新窗口?")
// 新窗口打開時彈出確認框,是否打開
if(myweb==true)
// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
{window.open('http://www.xianlaiwan.cn/','_blank','width400,height=500,toolbar=no,menubar=no')}
//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
// 新窗口打開時彈出確認框,是否打開
if(myweb==true)
// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
{window.open('http://www.xianlaiwan.cn/','_blank','width400,height=500,toolbar=no,menubar=no')}
//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
function openWindow (){
var check=confirm("你是否需要打開一個新的網頁?")
if (check==true){
var openurl=prompt("請輸入你的網址","http://www.xianlaiwan.cn")
window.open(openurl,'_blank','width=400,height=500')
}
}
var check=confirm("你是否需要打開一個新的網頁?")
if (check==true){
var openurl=prompt("請輸入你的網址","http://www.xianlaiwan.cn")
window.open(openurl,'_blank','width=400,height=500')
}
}
function openWindow(){
var a=confirm("確定打開?");
if(a==true){
var b=prompt("請輸入打開的網站");
window.open(b,'_block','width=400,height=500,menubar=no,toolbar=no');
}
}
var a=confirm("確定打開?");
if(a==true){
var b=prompt("請輸入打開的網站");
window.open(b,'_block','width=400,height=500,menubar=no,toolbar=no');
}
}
那個同學,function是函數的意思啊 它是定義函數的關鍵詞,你把它的代碼移出它的范圍,肯定就顯示不了了啊
2016-06-07