Trigger a function on key up on any input
<p>I want a javascript function to be triggered on key up on any input box. I tried using <code>getElementsByTagName.onkeyup</code> but it didn't work. Along with the solution please send a working jsfiddle. I don't want <code>document.getElementById</code> or <code>onkeyup="function()"</code> as there are many input boxes. It wont look tidy. I even tried</p>

<pre><code>$(document).ready(function(){
$('input').onkeyup(function(){
calculate();
})
})
</code></pre>

<p>I also want a function that will add 0 to the value of each input on window.onload.
Thank You</p>
