1.form表单,下面是例子:
注意:toTest()方法接收form表单内容,提交表单按钮需要设置 form-type="submit":
<form bindsubmit="toTest">
<input class="margin-20 text-30" value="" style="width:200rpx" name="testid" />
<button class="viewcentet" form-type="submit">
<text class='text-35 color-white' >保存</text>
</button>
</form>
接收:
//增加修改
toTest:function (e) {
var testid= e.detail.value.testid;
}