2025年7月
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
無料ブログはココログ

« IE7/IE8で、window.open()で作った子ウィンドウから親ウィンドウを.focus()でアクティブにする。(その3) | トップページ | window.open()やwindow.close()は非同期です。 »

2009年8月21日 (金)

window.focus()とwindow.document.focus()の違い。

window.focus()は複数タブで効かないが、window.document.focus()は複数タブのアクティブタブでは効く。

逆に、シングルタブでwindow.blurした後、window.focusは効くが、window.document.focusは効かない。

同様に、シングルタブで最小化した状態で、window.focusは効くが、window.document.focusは効かない。

« IE7/IE8で、window.open()で作った子ウィンドウから親ウィンドウを.focus()でアクティブにする。(その3) | トップページ | window.open()やwindow.close()は非同期です。 »