| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- {extend name="layout:home" /}
- {block name="container"}
- <style>
- .accountinfo_title{
- width: 150px;
- margin:50px auto;
- text-align: center;
- font-size: 13px;
- color: dodgerblue;
- }
- table{
- margin:-30px auto;
- font-size: 13px;
- margin-bottom: 100px;
- }
- /*.accountinfo_title table{*/
- /*margin-left: 150px;*/
- /*}*/
- table td{
- width: 100px;
- height: 60px;
- line-height: 60px;
- }
- .td_info{
- width: 80px;
- height: 60px;
- line-height: 60px;
- }
- .td_user_info{
- width: 220px;
- height: 60px;
- line-height: 60px;
- }
- table input{
- border: 1px #aaa solid;
- border-radius: 2px;
- height: 30px;
- width: 280px;
- line-height:30px ;
- }
- </style>
- <div class="layui-tab layui-tab-card">
- <div class="updatepwd">
- <form method="post">
- <div>
- <div class="accountinfo_title" style="font-size: 16px;">修改密码</div>
- <table>
- <tr>
- <td class="td_info">当前密码</td>
- <td class="td_user_info"><input type="text" name="password" id="password" placeholder="当前密码"></td>
- </tr>
- <tr>
- <td class="td_info" style="height: 80px;">修改密码</td>
- <td class="td_user_info" style="height: 80px;"><input type="text" name="new_password" id="new_password" placeholder="重置密码"><div id="pwd" style="font-size: 10px;color:#aaa;margin-top: -30px;">密码必须包含有字母,数字,符号,密码长度为6-20个字符</div></td>
- </tr>
- <tr>
- <td class="td_info">确认密码</td>
- <td class="td_user_info"><input type="text" name="confirm_password" id="confirm_password" placeholder="确认密码"></td>
- </tr>
- <tr>
- <td class="td_info"></td>
- <td>
- <input type="submit" id="layui-btn" value="保存修改" style="width: 70px;margin-left: 30px;">
- <input type="button" id="btn" value="取消" style="width: 70px;margin-left: 50px;">
- </td>
- </tr>
- </table>
- </div>
- </form>
- </div>
- </div>
- <script>
- $("#btn").click(function(){
- window.history.back(-1);
- });
- //密码 校验
- $("#new_password").blur(function(){
- var password = document.getElementById("new_password").value;
- var patrn=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,20}$/;
- if (!patrn.exec(password)){
- document.getElementById("new_password").style.borderColor = "red";
- document.getElementById("layui-btn").type = "button";
- }else{
- document.getElementById("new_password").style.borderColor = "#e6e6e6";
- if(document.getElementById("confirm_password").style.borderColor != "red"){
- document.getElementById("layui-btn").type = "submit";
- }
- }
- });
- $("#confirm_password").blur(function(){
- var password = document.getElementById("confirm_password").value;
- var patrn=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,20}$/;
- if (!patrn.exec(password)){
- document.getElementById("confirm_password").style.borderColor = "red";
- document.getElementById("layui-btn").type = "button";
- }else{
- document.getElementById("confirm_password").style.borderColor = "#e6e6e6";
- if(document.getElementById("new_password").style.borderColor != "red"){
- document.getElementById("layui-btn").type = "submit";
- }
- }
- });
- </script>
- <script type="text/javascript">
- layui.use('laydate', function(){
- var laydate = layui.laydate;
-
- //执行一个laydate实例
- laydate.render({
- elem: '#creatTime' //指定元素
- });
- laydate.render({
- elem:'#timeRang',
- range:true,
- format: 'yyyy/MM/dd',
- done: function(value, date){
- /* 时间选择完成后的回调 */
- }
- })
- });
- </script>
- {/block}
|