温馨提示×

微信小程序如何获取data数据

木子
2204
2021-05-12 19:34:40
栏目: 云计算

微信小程序获取data数据的方法:1、在微信开发者工具中打开项目。2、在JS文件中添加获取data数据的函数方法。


微信小程序如何获取data数据


微信小程序获取data数据的方法:

1、首先用微信开发者工具打开项目。

2、在JS文件添加获取data数据的函数方法,具体代码如下所示:


page({


  data:{name:"test"},


  showData:function(){


  var text=this.data.name


  }


  })





0