解决 登录系统保存账号密码后,录入表单自动填充到表单的账号密码

在input框中加入:readonly οnfοcus="this.removeAttribute('readonly');"即可以解决此问题.

例如:

<div class="layui-form-item" style="margin-top:10px;">
                <label class="layui-form-label" style="width: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="width: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>

 

posted @ 2019-07-17 09:35  其实哥很宅  阅读(1277)  评论(0编辑  收藏  举报