bootstrap模态框的关闭切换自定义

tech2023-09-18  99

 

代码:

<div class="form-box modal fade" style="display:none"  id="myModal_login" role="dialog">     <form class="front " id="top_login">         <div class="form-wrapper">                 <div>                     <span class="login_close"  data-dismiss="modal">X</span>                 </div>             <div class="header">                 Login             </div>             <div class="input-wrapper">                 <div class="content-wrapper">                     <input type="text" name="Uname" placeholder="username" class="conten-items"  />                 </div>

                <div class="content-wrapper">                     <input type="password" name="Upaw" placeholder="password" class="conten-items" />                 </div>                 <div class="action">                     <div class="btn" style="color: white" >login</div>                 </div>                 <div>                     <p style="margin-top: 40px ;color: white;" >If you don't have account.Please</p>                     <p style="color: white">Click here to <a href="#" id="signup" style="color: #0e92b3" > Regist </a></p>                 </div>             </div>

        </div>     </form>

</div>

 

 

JS:

$(function () { $("#myModal_login").modal({ show:false, backdrop:'static', }); });

 

$(function () { document.getElementById('regist').onclick=Login_Action; function Login_Action() { $("#myModal_reg").modal('toggle','hiden') $("#myModal_login").modal({ show:true, backdrop:'static' }); } });

注册的代码差不多的,改一下就可以了

 

 

最新回复(0)