微信小程序----搜索框input回车搜索事件

在微信小程序里的搜索框,按软键盘回车键触发搜索事件。

<input type="text"  placeholder="搜索" value="{{inputVal}}"  bindinput="inputTyping" bindconfirm="search" />

bindconfirm  即为回车事件,为它绑定上需要触发的事件。search是对应的搜索方法。

猜你喜欢

转载自www.cnblogs.com/Super-scarlett/p/9451190.html