JQuery 判断某个属性是否存在 hasAttr

if(typeof($("#aid").attr("rel"))=="undefined")

如果有Css类就用$("input[name=className]").hasClass("className")