最佳答案
你如何做jQuery的hasClass与平原ol ' JavaScript?例如,
<body class="foo thatClass bar">
JavaScript用什么方法问<body>是否有thatClass?