I have a form with different html input fields…
1) <input type="text">
2) <textarea></textarea>
3) <input type="checkbox">
4) <input type="radio">
5) <select></select>
How would I be able to determine what type of input field it is using jQuery. For example: If I wanted to do a check to see if input = “select” then do stuff.
you can use
event.target.type, this alerts what type ofinput,textreaorselectis the target of the event.http://jsfiddle.net/Q4BNH/