<script type="text/javascript">
function openWindow(){
if(confirm("是否打開")){
// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
window.open("http://www.xianlaiwan.cn/",'_blank','width=400px,height=500px,menubar=no,toolbar=no');}
}
function openWindow(){
if(confirm("是否打開")){
// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
window.open("http://www.xianlaiwan.cn/",'_blank','width=400px,height=500px,menubar=no,toolbar=no');}
}
一篇給小白看的 JavaScript 引擎指南:http://t.cn/R42u4b9
給 JavaScript 初學者的 ES2015 實戰:http://t.cn/R42utgO
作者結合自身總結的前端入門方法:http://t.cn/R42uiSb
給 JavaScript 初學者的 ES2015 實戰:http://t.cn/R42utgO
作者結合自身總結的前端入門方法:http://t.cn/R42uiSb
2016-05-17
function openWindow(){
var mymessage=confirm("是否打開新窗口?");
if(mymessage ==true)
{
var myhtml=prompt("請輸入你想打開的網頁","http://www.xianlaiwan.cn");
if(myhtml!=null)
{window.open(myhtml,'_blank','width=400px,height=500px,menubar=no,toolbar=no'); }
else{}} }else{} }
var mymessage=confirm("是否打開新窗口?");
if(mymessage ==true)
{
var myhtml=prompt("請輸入你想打開的網頁","http://www.xianlaiwan.cn");
if(myhtml!=null)
{window.open(myhtml,'_blank','width=400px,height=500px,menubar=no,toolbar=no'); }
else{}} }else{} }