Given the following sample code:
$(document).ready(function(){
$(\":input\").blur(function(){
alert(\"The input type is:\" ); //How would this l
How can I deteminedetermine whether this is an input, select, text, etc?
Note that select, textarea, "etc" elements are not covered by $('input'). You probably rather want to use $(':input') to get them all.
$(document).ready(function(){
$(':input').blur(function(){
alert('The tag is:' + this.tagName);
if (this.tagName == 'INPUT') {
alert("The input type is:" + $(this).attr('type'));
}
})
});