tags:

views:

67

answers:

1

jquery: how to check if user entered txt inside textbox and if user clicked on checkbox, and if user selected something from dropdown select ?

so like if a user enters xxxx inside input box, i need to detect this.

same with checkbox, dropdown, all forms.

+1  A: 

Your question is rather unclear.

If you want to call a function when the textbox, checkbox, or dropdown is changed, all you need to do is call change() in jQuery, like this:

$("input").change(function() {
    // Action goes here
});
$("select").change(function() {
    // Action goes here
});

Alternatively, if you are trying to validate the form, you may want to look into the Validation plugin for jQuery.

Ben