Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$(document).ready()ダイアログ コントロールの一部として読み込まれる別のビューに配置された場合、いつ実行されますか? 親ページによって呼び出されたダイアログ内でビューが完全に読み込まれた後に実行するパターンに従いますか?
$(document).ready()
$(document).ready メソッドは、DOM (ドキュメント オブジェクト モデル / ページのすべての要素) が正常に読み込まれた後にのみ、JavaScript を実行することを意味します。
したがって、論理的には、JavaScript コードを $(document).ready() の下に配置すると、ページのすべての要素が読み込まれた後に実行されます。