小程序使用from提交的2种方式
- botton提交
input框键盘完成提交
botton提交
<form class="search" bindsubmit="formSubmit">
<input name="keyword" placeholder="搜索最优惠商品"/>
<button class="btn_login" formType="submit">搜索</button>
</form>
点击搜索 button 按钮即可提交表单
input框键盘完成提交
<form class="search" bindsubmit="formSubmit">
<input name="keyword" placeholder="搜索最优惠商品" bindconfirm="formSubmit"/>
</form>
点击搜索 button 按钮即可提交表单
综合:点击搜索按钮提交或者直接在输入框输入数据按完成提交
<form class="search" bindsubmit="formSubmit">
<input name="keyword" placeholder="搜索最优惠商品" bindconfirm="formSubmit"/>
<button class="btn_login" formType="submit">搜索</button>
</form>