1、新窗口打開時彈出確認(rèn)框,是否打開 提示: 使用 if 判斷確認(rèn)框是否點(diǎn)擊了確定,如點(diǎn)擊彈出輸入對話框,否則沒有任何操作。 2、通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/ 3、打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
1、新窗口打開時彈出確認(rèn)框,是否打開
提示: 使用 if 判斷確認(rèn)框是否點(diǎn)擊了確定,如點(diǎn)擊彈出輸入對話框,否則沒有任何操作。
2、通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
3、打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
2017-09-01
2017-08-31
function openWindow()
{
????var choice = confirm("是否確認(rèn)打開?");
????if(choice==true)
????{
????? ? var input=prompt("請輸入需要打開的網(wǎng)頁網(wǎng)址:","http://idcbgp.cn");
????????window.open(input,"_blank","width=400,height=500,menubar=no,toolbar=no");
????}
}
2017-08-31
<script type="text/javascript">
????function open(){
? ? var con = window.confirm("是否打開");
????if(con==true){window.open("idcbgp.cn","_blank","width=400,height=500");}
</script>
<input type="button" value="確認(rèn)框" onclick="open()"/>
2017-08-31
function blank(){
var a=comfirm("是否打開");
if(a){
var b=prompt("確定打開網(wǎng)址","http://idcbgp.cn/");
window.open('b','aaa','width=400,height=500,menuebar=no,toolbar=no');
}
}