首页 > 技术文章 > h5移动端设置键盘搜索

wzybnzy 2017-09-05 15:06 原文

 

点击键盘上的搜索按钮实现页面跳转

<form action="#list?goods_title={{message?message:''}}" @submit.prevent="onEnvent'>
  <input class="iconfont" type="search" v-on:focus="searchKeyword" :class="{active: isActive}" v-on:blur="cancelKeyword" v-model="message"/>
</form>

action 后边跟着要跳转的页面及参数

onEnvent函数控制点击搜索按钮时,需要做的一些操作或判断

input type要设置为search

 

 

 

推荐阅读