為何不能只用一個(gè)確認(rèn)對(duì)話框 confirm ,點(diǎn)擊確認(rèn)直接進(jìn)入window.open ,直接進(jìn)入新窗口呢?這是為什么
為何不能只用一個(gè)確認(rèn)對(duì)話框 confirm ,點(diǎn)擊確認(rèn)直接進(jìn)入window.open ,直接進(jìn)入新窗口呢?這是為什么
為何不能只用一個(gè)確認(rèn)對(duì)話框 confirm ,點(diǎn)擊確認(rèn)直接進(jìn)入window.open ,直接進(jìn)入新窗口呢?這是為什么
2015-12-24
舉報(bào)
2015-12-24
<!DOCTYPE HTML>
<html>
<head>
<title>一個(gè)對(duì)話框</title>
<script style="text/script">
function sml(){
var sm=confirm("ha");
if(sm==true)
{window.open("http://idcbgp.cn");}
</script>
</head>
<body>
<script style="text/script">
var sm=confirm("是否打開網(wǎng)頁");
if(sm==true)
{window.open("http://idcbgp.cn");}
</script>
</body>
</html>
你是要這種效果嗎
2016-01-19
confirm確定直接打開網(wǎng)址的話,就缺少用戶自己修改網(wǎng)址這一步驟啦
“2、通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/”
2015-12-24
<!DOCTYPE HTML>
<html>
<head>
<title>一個(gè)對(duì)話框</title>
</head>
<body>
<script style="text/script">
var sm=confirm("是否打開網(wǎng)頁");
if(sm==true)
{window.open("http://idcbgp.cn");}
</script>
</body>
</html>
是這個(gè)