js获取html标签(元素)的属性

document.documentElement.getAttribute('data-xxx')

 

posted @ 2023-05-18 21:24  蓓蕾心晴  阅读(168)  评论(0编辑  收藏  举报