Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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);"" />
 
PREVIOUS NEXT
Tagged: #limit #number #values #twxt #input
ADD COMMENT
Topic
Name
8+1 =