javascript to select other field: using onchange and onkeyup is better.
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
for(var i = 0 ; i < other_inputs.length ; i++) {
|
for(var i = 0 ; i < other_inputs.length ; i++) {
|
||||||
(function(other_input) {
|
(function(other_input) {
|
||||||
other_input.onchange = function() { select_other_handler(other_input.name); };
|
other_input.onchange = function() { select_other_handler(other_input.name); };
|
||||||
|
other_input.onkeyup = function() { select_other_handler(other_input.name); };
|
||||||
})(other_inputs[i]);
|
})(other_inputs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user