ie6,7下的textarea的type获取

<input type='button' value="按钮" class='gys'>

<textarea class='gys gystextarea'>大文本框</textarea>

$(".gys").each(function(){

  alert($(this).attr("type"));

});

结果是 textarea在火狐下是undefined,在ie6,7下是textarea(小写)

原文地址:https://www.cnblogs.com/guoyansi19900907/p/3364984.html