在input框中加入:readonly οnfοcus="this.removeAttribute('readonly');"即可以解决此问题.
例如:
<div class="layui-form-item" style="margin-top:10px;"> <label class="layui-form-label" style="140px;">预警间隔(分)</label> <div class="layui-input-block"> <input type="text" name="time_interval" value="<%=Model.time_interval %>" lay-verify="required|number" autocomplete="off" placeholder="0" class="layui-input" readonly onfocus="this.removeAttribute('readonly');"> </div> </div> <div class="layui-form-item" style="margin-top:10px;"> <label class="layui-form-label" style="140px;">系统密码</label> <div class="layui-input-block"> <input type="password" name="password" value="<%=Model.password %>" autocomplete="off" placeholder="请输入标题" class="layui-input" readonly onfocus="this.removeAttribute('readonly');"> </div> </div>