无线电/复选框按钮”;oncheck”;使用javascript检查/选择时的事件

Radio/checkbox buttons "oncheck" event when is checked/selected with javascript

本文关键字:选择 事件 检查 oncheck 复选框 按钮 无线电 使用 javascript      更新时间:2023-09-26

如何检测用javascript选中单选按钮/复选框按钮的时刻?

例如:

document.getElementById("myRadioButton").checked = true

有没有一种方法可以检测"myRadioButton"的状态变化并找到一个处理程序?

我需要它专门用于Internet Explorer 6+。

最后我找到了一个解决方案,用javascript(不仅如此)检查触发单选/复选框按钮的事件在ie中称为onpropertychange,在firefox

中称为DOMATTModified