登陆页面问题(wnf管理平台)

mac2022-06-30  88

1.验证码(随机数)

//获取验证码var random;function codeImg () { random=Math.random(); var $codeImg = $(".code_img"); var rad="https://services.torld.com/advertiser_forward/service?service=tor.code&rm="+random; $codeImg.attr("src", rad);}codeImg();2.登陆//登录 $(".btn").click(function () { //用户名 var $username = $(".userName").val(), $password = $(".password").val(), $code = $(".code").val();//登录接口 common.ajax({ data:{ service: "tor.login", username: $username, passwd: md5($password), checkcode: $code, rm: random }, fail:function(re){ codeImg(); }, success: function (re) { $.cookie("login_token", re.token); sessionStorage.setItem("menu", JSON.stringify(re)); sessionStorage.setItem("username", $username); location.href = "common.html"; } });});3.width //在图片收缩的同时,保持在页面居中显示width: -webkit-fit-content;width: -moz-fit-content;width: -ms-fit-content;width: -0-fit-content;

 

转载于:https://www.cnblogs.com/QIQIZAIXIAN/p/6590402.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)