问题描述
- JAVA点击按钮 将Form窗体的hidden属性的true值改为false?
-
<button type="button">管理员登陆</button> 点击管理员登陆这个按钮,将下面的Form窗体的hidden属性值如何变为false <form action="${ctx}/login.action" id="loginForm" method="post" hidden="true"> <input type="text" autocomplete="off" id="lname" name="lname" placeholder="用户名" required="required" /> <input type="password" id="pwd" name="pwd" placeholder="密码" required="required" /> <input autocomplete="off" type="text" id="cc" name="cc" placeholder="验证码" required="required" /> <img src="${ctx}/cc.action" id="img_cc" title="点击更换" style="cursor: pointer;"/> <button type="submit" onclick="ss" data-toggle="modal" data-target=".bs-example-modal-lg" class="lo">登录</button> <div id="msg">${msg}</div> <c:remove var="msg" scope="session"/> </form>
解决方案
<button type="button" onclick="document.getElementById('loginForm').setAttribute('hidden',false)">管理员登陆</button>
时间: 2024-11-08 19:25:51