Answers for "jquery check if input is empty on keyup"

0

jquery check if input is empty on keyup

http://jsfiddle.net/DKW7M/

HTML:
<input type="text" id="test" />
-----
JS:

$("#test").keyup(function() {
                var input = $(this);

                if( input.val() == "" ) {
                  input.css( "border", "1px solid #000" );
                }   
            });
Posted by: Guest on December-24-2021

Code answers related to "jquery check if input is empty on keyup"

Code answers related to "Javascript"

Browse Popular Code Answers by Language