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:
and here example:
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
Post a Comment