querySelectorAll() 的用法


1.改变样式
let dom = document.querySelectorAll('.waListHeight  .ant-table-body');
dom[0].style.height ='100px';

let dom = document.querySelectorAll('.waListHeight');
dom[0].style.height ='100px';

2.给元素添加类名
document.querySelector("html").classList.add("noscroll");

3.给元素删除类
document.querySelector("html").classList.remove("noscroll");
 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM