Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript password max length

    let pass = document.getElementById('pass-one');
    let count = document.getElementById('counter');
    let maxLength = 10;
    pass.setAttribute('maxlength', maxLength);
    pass.addEventListener('input', () => {
        count.innerText = `${pass.value.length}/${maxLength}`;
    })
 
PREVIOUS NEXT
Tagged: #javascript #password #max #length
ADD COMMENT
Topic
Name
1+6 =