我是一个小白,请问一下,怎么预设答案,然后等输入框的内容与之一样,按钮才可用呢,谢谢大家
<view class="page-section">
<view class="weui-cells__title">提问</view>
<view class="weui-cells weui-cells_after-title">
<view class="weui-cell weui-cell_input">
<input class="weui-input" maxlength="20" password type="text" placeholder="这是一个输入框" />
</view>
</view>
</view>
<view class="page-body">
<view class="btn-area" id="buttonContainer">
<button type="primary" disabled="ture">完成</button>
</view>
</view>
校验答案,简单的前端还可以做,复杂的需要后端来,无非就这两种,disabled="ture"等于检验结果的的反值不就行了