开发者

Jquery, finding the type of a selector - howto?

开发者 https://www.devze.com 2023-01-22 02:05 出处:网络
I need a way to determ开发者_StackOverflowine if a returned object is a textarea (for example).Try with:

I need a way to determ开发者_StackOverflowine if a returned object is a textarea (for example).


Try with:

$('selector').is('textarea');

Or:

alert($('selector')[0].type);


$("selector").attr('type')
0

精彩评论

暂无评论...
验证码 换一张
取 消