$(function () {
        $("#confirmpassword").click(function () {

            var pwd = $("#txtPwd").val();
            layer.open({
                type: 1
                , title: '请输入登入密码'
                , closeBtn: false
                , area: '350px;'
                , shade: 0.8
                , id: 'LAY_layuipro' //设定一个id,防止重复弹出
                , btn: ['保存','关闭']
                , btnAlign: 'c'
                , moveType: 1 //拖拽模式,0或者1
                , content:'<div style="padding: 30px 20px;; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">密码:<input id="firstpwd" type="password" placeholder="请输入密码"></div>'//弹出的子页面
                , yes: function (index, layero) {
//获取输入框内容
var oldPass=layero.find('#firstpwd'); var pass = $(oldPass).val(); var pwd = $("#txtPwd").val(); //var jmpwd = hex_md5(pass).toUpperCase();//这是MD5加密 alert(pwd); alert(pass); alert(jmpwd); if (pwd == jmpwd) { myfunction(); } else { alert("密码错误"); } layer.close(index); }, cancel: function (index) { layer.close(index); } }); }); });

 

posted on 2019-10-15 11:20  青春似雨后霓虹  阅读(4537)  评论(0编辑  收藏  举报