微信小程序点击触发事件bindtap

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_39702981/article/details/84836318

微信小程序点击触发事件bindtap

bindtap事件

在wxml文件中绑定bindtap事件,

 <view class='wel-list' bindtap='TZdown'>
    <image src="/images/welcome_08.png"></image>
    <text>C语言资料下载</text>
  </view>
然后在js文件中进行响应

Page({
  TZdown: function () {
    wx.navigateTo({
      url: '../download/download'
    });
  }
})

这样在单击view层的时候就会跳转到指定的URL地址了

原文链接:https://blog.csdn.net/qq_15980721/article/details/78992517

猜你喜欢

转载自blog.csdn.net/qq_39702981/article/details/84836318
今日推荐