Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

only positive numbers and decimals input js

 <input type="text" onkeyup="value=value.replace(/[^0-9^.]+/g,'').replace('.','$#$').replace(/./g,'').replace('$#$','.').replace(/^0+/, '')"
  th:placeholder="Please enter xxx"/>
12
Source by programmersought.com #
 
PREVIOUS NEXT
Tagged: #positive #numbers #decimals #input #js
ADD COMMENT
Topic
Name
4+5 =