hanya bilangan positif dan desimal input js

 <input type="text" onkeyup="value=value.replace(/[^0-9^\.]+/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.').replace(/^0+/, '')"
  th:placeholder="Please enter xxx"/>
12
Philan ISithembiso