新窗口打开时弹出确认框,是否打开
function openWindow(){ var k = confirm("您确定要新窗口打开网站?"); if(k){ var url = 'http://www.imooc.com/'; var p = prompt("请输入网址",url); if(p){ window.open(url,'_blank','width=400,height=500,menubar=no'); } } }
function openWindow(){ var k = confirm("您确定要新窗口打开网站?"); if(k){ var url = 'http://www.imooc.com/'; var p = prompt("请输入网址",url); if(p){ window.open(url,'_blank','width=400,height=500,menubar=no'); } } }
2015-07-31
举报