微信小程序之获取点击软键盘搜索按钮(confirm-type="search")之后的值
Posted on 2019-09-23 12:14 jessie-xian 阅读(3784) 评论(0) 编辑 收藏 举报<input
name="search"
type='text'
confirm-type="search"
bindconfirm="bindconfirm"
focus='{{focus}}'
bindinput='bindinput' ></input>
// 点击键盘上的搜索
bindconfirm:function(e){
var that=this;
var discountName=e.detail.value['search - input'] ?e.detail.value['search - input'] : e.detail.value
console.log('e.detail.value', discountName)
},