使用jQuery获取元素类名-2024年7月29日 · So if you want to have the class selector , do the following : 因此,如果您想拥有类选择器 ,请执行以下操作: var className = '.' +$('#id').attr('class').split(' '). join ('.') and 更多内容请查看https://blog.csdn.net/w36680130/article/details/105661110