对于 jq 来讲 判断 是否 含有 元素 可使用 : 例子:this
/ 方案二 if ($(this).find('ul').length == 0) { // Code }
若是 是 判断 classcode
if ( false== $("#agreement").hasClass("on")) { }