一个避免无意中鼠标滚轮滚动,而导致当前选择框改变的脚本

window.attachEvent("onload", function() {
selects = document.getElementsByTagName(‘SELECT’);
for (var i = 0; i < selects.length; i++ ) {

selects[i].old_onchange = selects[i].onchange;

selects[i].onchange = function() {

this.old_onchange();

window.focus();

}
}
});

Comments are closed.