Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

input non-negative decimal in typescript

<input type="number" min="0" oninput="this.value = 
 !!this.value && Math.abs(this.value) >= 0 ? Math.abs(this.value) : null">
 
PREVIOUS NEXT
Tagged: #input #decimal #typescript
ADD COMMENT
Topic
Name
7+4 =