没有form的input点击按钮获取input的值 不是通过input事件获取
例如:
<input class="weui-search-bar__input" placeholder="搜索" value="{{inputVal}}" focus="{{inputShowed}}" > <button type="primary" bindtap="butsubmit">搜索</button>
可以在data内设置inputVal变量 ,当点击搜索时触法函数butsubmit获取
data: {
inputVal: ""
},
butsubmit:function(e){
console.log(this.data.inputVal)
},