Search
 
SCRIPT & CODE EXAMPLE
 

HTML

input number maxlength

<form method="post">
      <label for="myNumber">My Number:</label>
      <input type="number" maxlength="9" required
      oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" >
     <br><br>
      <input type="submit" value="Submit">
</form>
Comment

input number maxlength html

<input name="var"
    oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
    type = "number"
    maxlength = "6"
 />
Comment

input type number max value validation

/* comman function for all input by joshi yogesh {joshiyogesh0333@gmail.com} */

$(function () {
   $( "input" ).change(function() {
   var max = parseInt($(this).attr('max'));
   var min = parseInt($(this).attr('min'));
   if ($(this).val() > max)
   {
      $(this).val(max);
   }
   else if ($(this).val() < min)
   {
      $(this).val(min);
   }       
 }); 
});
Comment

PREVIOUS NEXT
Code Example
Html :: html info on hover 
Html :: font awesome icons html 
Html :: tailwind css product card 
Html :: html vs htm 
Html :: html time input with second 
Html :: git print commit tree html 
Html :: disable an anchor tag 
Html :: html css how to position elements on right of div 
Html :: javascript popup form 
Html :: unselectable input field 
Html :: dark blue html code 
Html :: ol html 
Html :: how to increase font size in html 
Html :: html font style 
Html :: insert html in html 
Html :: px in server 
Html :: javascript wait for image to load 
Html :: font color html 
Html :: how to load at bottom of page html 
Html :: delete icon in html 
Html :: ngbdatepicker disable input 
Html :: svelte if block 
Html :: can i write php code in html file 
Html :: image in html table 
Html :: marquee tag html 
Html :: in html the color for red 
Html :: use disabled= in button 
Html :: boostrap base theme 
Html :: bootstrap box 
Html :: random user image url 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =