javascript - Trigger a function on key up on any input -


i want javascript function triggered on key on input box. tried using getelementsbytagname.onkeyup didn't work. along solution please send working jsfiddle. don't want document.getelementbyid or onkeyup="function()" there many input boxes. wont tidy. tried

$(document).ready(function(){ $('input').onkeyup(function(){ calculate(); }) }) 

i want function add 0 value of each input on window.onload. thank you

demo there no onkeyup event in jquery tru change keyup

 $(document).ready(function(){       $('input').keyup(function(){       calculate();       })     }) 

.keyup()


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -