input type number atau input type angka

http://stackoverflow.com/questions/8808590/html5-number-input-type-that-takes-only-integers

<input type="text" placeholder="024123456" class="form-control" name="tlp" value="" onkeypress="return isNumberKey(event);" maxlength="15" >    


The easy way using JavaScript:


<input type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');" >

Subscribe to receive free email updates:

0 Response to "input type number atau input type angka"

Post a Comment