javascript - How can convert numbers to words on load event? -
javascript - How can convert numbers to words on load event? -
i did javascript working fine , translating numbers words.
but doing action when click on "calculate" , want show translation without typing or doing click assing value
here view
<form> number words<br> <br>number/número <input name="number" type="text" size="60" value="123"><br> <input name="calc" type="button" value="calculate" onclick="calculate(this.form)"> <input name="reset" type="button" value="reset" onclick="clearform(this.form)"> <br> spanish<br><textarea name="spanish" rows="5" cols="90"></textarea><br> </form>
here demo http://jsfiddle.net/rq7r4/13/
somebody can help me this?
the next both 'translate' on load , while type -- careful, can maintain browser busy if have high number of form elements have read:
$(function() { $('input[name=number]').on('keyup alter blur',function() { calculate( this.form ); }); calculate( $('form')[0] ); });
amazingly working demo
i had alter input
element type
text
number
can respond number -- auto-validation of sorts:
<input name="number" type="number" size="60" value="123"><br>
javascript jquery html
Comments
Post a Comment