2019独角兽企业重金招聘Python工程师标准>>>
var str = $(obj).attr("class");var strs = str.split(" ");var yz = $.inArray("cur",strs);if(yz!=-1){console.log("当前对象含有名字为cur的class");}else{console.log("当前对象不存在名字为cur的class");}
转:https://my.oschina.net/kangweb/blog/1635344