onchange
in IE only fires when the checkbox loses focus. So if you tab to it, hit space a few times, tab out, you'll only get one onchange
event, but several onclick
events.
Note: this is one of the very, very, very rare times when IE's behavior is correct (according to spec) and other browsers are wrong.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…