js(判断元素是否包含某个class名)

element.className.indexOf('rgb196') !== -1

//为-1则不包含该class

猜你喜欢

转载自blog.csdn.net/qq_39237755/article/details/81281943