收藏
回答

mytouchStart :function(event)的event为空?

XML:
<view bindtouchstart="mytouchStart">
  hello world
</view>

JS:
mytouchStart :function(event) {
    console.log(event)
}

我就是简单给view绑定了 touchstart 事件,然后想获取点击时鼠标坐标,但是打印出来的 event 一直为空,为什么呢?
回答关注问题邀请回答
收藏

1 个回答

  • 社区技术运营专员--Asher
    社区技术运营专员--Asher
    2021-12-10

    html:<view>

      <input class="weui-inputbindblur="bindInputBlurauto-focus placeholder="将会获取焦点"/>

    </view>

     js: bindInputBlur(e) {

        console.log(e)

    }

    2021-12-10
    有用
    回复
登录 后发表内容