官方手册:
实例走一波 >>>
form.wxml
<!--pages/form/form.wxml-->
<text>pages/form/form.wxml</text>
<view class="viewTitle">
<text class="view-Name">form表单</text>
<view class="lineView"></view>
</view>
<!--这里用form,name=“nameName1”可以作为form的属性进行
(e.detail.value.nameName1)调用,
form自带有提交和重置按钮,会自动获取表单中所有控件值的改变-->
<form class="page__bd" bindsubmit="formSubmit" bindreset="formReset">
<view class="section section_gap">
<view class="section__title">switch开关:</view>
<switch name="switch"/>
</view>
<view class="section section_gap">
<view class="section__title">slider滑块:</view>
<slider value="50" name="slider" show-value ></slider>
</view>
<view class="section">
<view class="section__title">inpu