<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div class="one">
<div class="two">
<div class="three">
<div class="four"></div>
</div>
</div>
</div>
</body>
</html>
1 回答
我爱钱端
TA贡献14条经验 获得超3个赞
var one = document.getElementsByClassName('one')[0];
one.className = "one find";
添加回答
举报
0/150
提交
取消