wxml
<view>
<text class="title" id="jiedian">节点</text>
</view>
js
seldom(){
wx.createSelectorQuery()
.in(this)
.select('#jiedian')
.boundingClientRect()
.exec(function (rects) {
console.log(rects)
})
}
博客列表 >微信小程序wx.createSelectorQuery()获取dom元素节点
<view>
<text class="title" id="jiedian">节点</text>
</view>
seldom(){
wx.createSelectorQuery()
.in(this)
.select('#jiedian')
.boundingClientRect()
.exec(function (rects) {
console.log(rects)
})
}