微信小程序开发:关于data-key

在wxml页面设置后台js中data中的值,可以用到data-*的方法: 例子: wxml中代码: js中代码:通过event参数来获取前端data-*中的值 在控制台输出:data中的值在event.target.dataset中
相关文章
相关标签/搜索