文章详情
js打开一个新的浏览器窗口
Posted on 2019-01-19 04:03:24 by 主打一个C++
window.addEventListener('resize', function () {
window.resizeTo(800, 600);
});
function openNewWindow() {
const url = 'G:\\SecurityCatalog\\index.html';
window.open(url, "Link", "toolbar=0,location=0,directories=0,status=0,menubar=0,titlebar=no,scrollbars=1,resizable=0,width=450,height=310,left=500,top=350");
if (newWindow) {
newWindow.focus();
window.close();
} else {
alert('浏览器阻止了新窗口的打开,请允许新窗口打开。');
}
}
*转载请注明出处:原文链接:https://cpp.vin/page/137.html