【微信小程序】获取dom元素的方法

微信小程序获取dom元素的方法

var query = wx.createSelectorQuery();
query.select('#xxx').boundingClientRect()
query.exec(function (res) {
//res就是 所有标签为mjltest的元素的信息 的数组
console.log(res);
})

posted @ 2022-06-05 15:36  一个大不刘blog  阅读(1288)  评论(0编辑  收藏  举报