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.
divページ上でのユーザーの操作に基づいて、頻繁に表示されたり消えたりします。要素の表示プロパティが に変更されたときに検証をトリガーしたいdisplay:none。それを行う最良の方法は何ですか?
div
display:none
DOM はビューです。「これが起こったときに何かをする」のようなことは、イベントのようなトリガーであり、これはモデルに属します。
設定したすべての場所を見つけdisplay: none;て、フック可能なプロセスに置き換えます。
display: none;