Listening for variable changes in JavaScript

后端 未结 22 2791
自闭症患者
自闭症患者 2020-11-21 06:57

Is it possible to have an event in JS that fires when the value of a certain variable changes? JQuery is accepted.

22条回答
  •  无人共我
    2020-11-21 07:07

    If you're using jQuery {UI} (which everyone should be using :-) ), you can use .change() with a hidden element.

提交回复
热议问题