Form Control JavaScript DHTML




    function validate(){
        x=document.myForm
        txt=x.myInput.value
        if (txt>=1 && txt<=5) {
            return true
        }else{
            alert("Must be between 1 and 5")
            return false
        }
}



    
    Enter a value from 1 to 5: