窗口.打开不可调整大小,可滚动

window.open not resizable, scrollable

本文关键字:滚动 可调整 窗口      更新时间:2023-09-26

我尝试了window.open并希望javascript使用新url打开一个新浏览器,并希望新窗口可调整大小和可滚动

我试过了

window.open("someurl", '_blank','windowOpenTab', 'scrollbars=1,resizable=1,width=1000,height=580,left=0, top=0');

编辑1:尝试window.open(url, '_blank','windowOpenTab', 'scrollbars=1,resizable=1,width=1000,height=580,left=0,top=0');还是没有运气

阅读有关 Windows.Open from http://www.javascript-coder.com/window-popup/javascript-window-open.phtml 但没有运气:(

根据 MDN,该函数中只能有 3 个参数。

window.open(strUrl, strWindowName[, strWindowFeatures]);

在这里演示 - 我放下了'_blank'并制作了一个带有小窗口的演示,只是为了让滚动条显示。

因此,您可以使用:

window.open("someurl", 'windowOpenTab', 'scrollbars=1,resizable=1,width=1000,height=580,left=0,top=0');

更改

 window.open("someurl", '_blank','windowOpenTab', 'scrollbars=1,resizable=1,width=1000,height=580,left=0, top=0');

 window.open("someurl", 'windowOpenTab', 'scrollbars=1,resizable=1,width=1000,height=580,left=0, top=0');

只需取下_blank,小提琴。

试试这个

 function openPopupWindow(){ 
window.open("http://example.com","popup","width=668,height=548,scrollbars=yes, resizable=yes");     
 }

试试这个

popupWin = window.open('http://webdesign.about.com/',
'open_window','menubar, toolbar, location, directories, status, scrollbars, resizable,
dependent, width=640, height=480, left=0, top=0')