Search
 
SCRIPT & CODE EXAMPLE
 

HTML

limit number of values in a twxt input

<script language="javascript" type="text/javascript">
function limitText(limitField, limitNum) {
    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    }
}
</script>

    <input type="text" id="sessionNo" name="sessionNum" onKeyDown="limitText(this,5);" 
onKeyUp="limitText(this,5);"" />
Comment

PREVIOUS NEXT
Code Example
Html :: a href tag 
Html :: nuclear bomb 
Html :: html image size 50 percent 
Html :: country code dropdown with flag bootstrapp 
Html :: meta name and content 
Html :: html tags 
Html :: google colab to html 
Html :: button that links to controller html 
Html :: link to google icons embed in my website 
Html :: html block button tag 
Html :: title tag html 
Html :: what should i use for html 
Html :: px in server 
Html :: html insert image 
Html :: name attribute in html 
Html :: html marquee tag 
Html :: html make an alert for delete 
Html :: cant pass multipule select input bootstrap 
Html :: ng for 
Html :: how open url in html in new window with custom size 
Html :: html input invalid 
Html :: html table prevent text wrap 
Html :: lightweight charts cdn 
Html :: react render html 
Html :: how to make a youtube video on a website and let it start by a set time 
Html :: smarty print html 
Html :: tailwind css width 50 percent 
Html :: how to make a class in html 
Html :: Modify h1 text 
Html :: lorem ipsum text 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =