windowの操作

別ウインドウを開く

別ウインドウをサイズ、各バーを指定して開く

jQueryで指定。リンク先を別ウインドウで開く。(アクセシビリティの確保)

window.open() のパラメーター

パラメーター意味
width 数値ウィンドウ幅
height 数値ウィンドウ高さ
left 数値ウィンドウ位置左
top 数値ウィンドウ位置上
menubar yes/noメニューバー有無
toolbar yes/noツールバー有無
location yes/noアドレスバー有無
status yes/noステータスバー有無
resizable yes/noリサイズ可否
scrollbars yes/noスクロールバー有無

サンプル

window.open('js2-2.html', 'sub3', 'width=400, height=300, menubar=no, toolbar=no, scrollbars=yes');
window.open('js2-2.html', 'sbu2', 'width=400, height=1200, location=no, resizable=no, scrollbars=no'));

小技