javascript - html input field set range -


what efficient way set range input-field -100.0 100.0? check every character. other characters -,0,1,2,3,4,5,6,7,8,9 , . not allowed. values without floating point, e.g. 78, possible.

update

i need solution ie, html5 solution type="range" or type="number" useless me. code have input field:

<input type="text" id="zahlenwert" value="" /> 

the question is: have check every character onkeydown() or there smarter way?

here looking for:

http://jeroenvanwarmerdam.nl/content/resources/javascript/jquery/spincontrol/jquery-spincontrol-1.0.zip

and here example:

http://jeroenvanwarmerdam.nl/content/resources/javascript/jquery/spincontrol/jquery-spincontrol.html?x=31&y=10

integration:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="jquery-numeric.js"></script> <script type="text/javascript" src="jquery-number-selector.js"></script> <script type="text/javascript" src="jquery-spincontrol-support.js"></script> <script type="text/javascript" src="jquery-spincontrol.js"></script>  <!-- spincontrol definition --> <script type="text/javascript"> (function($) {     $(function() {         $(":number").addclass("number").spincontrol({ folder: "images/" });     }); })(jquery); </script> 

here body html code:

<input type="number" max="10" min="-10" step="0.5" /> 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -