获取动态元素高度


      //创建节点选择器
      var query = wx.createSelectorQuery();
      //选择id
      query.select('#content').boundingClientRect()
      query.exec(function (res) {
        //res就是 所有标签为mjltest的元素的信息 的数组
        console.log(res);
        //取高度
        console.log(res[0].height);
      })

 


免责声明!

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



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