摘要: 先判断是否有这个类名: function hasClass( elements,cName ){ return !!elements.className.match( new RegExp( "(\\s|^)" + cName + "(\\s|$)") ); }; 或者: 利用this.getAtt 阅读全文
posted @ 2017-10-17 16:43 海阔天空98 阅读(459) 评论(0) 推荐(0) 编辑