src/main/webapp/student/js/Longin.js

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

function login(){
    var username = document.getElementById("ID").value;
    var password = document.getElementById("PASSWORD").value;
    if(username==""){
        $.jGrowl("用户名不能为空!", { header: '提醒' });
    }else if(password==""){
        $.jGrowl("密码不能为空!", { header: '提醒' });
    }else{
        AjaxFunc();
    }
}
function AjaxFunc()
{
    var username = document.getElementById("ID").value;
    var password = document.getElementById("PASSWORD").value;
    $.ajax({
        type: 'post',
        url: "$/TestOnline/stulogin?time="+new Date().getTime(),
        dataType: "json",
        data: {"username": username,"password": password},
        success: function (data) {
            var return_aaa = data.return_date;
             
            if(return_aaa=="success"){
            	window.location.href = "index.jsp";
            }else{
            	$.jGrowl("用户名密码错误!", { header: '提醒' });
            }
        },
        error: function (xhr, type) {
            console.log(xhr);
        }
    });
}





function checkForm(){
    var nametip = checkUserName();
    var passtip = checkPassword();
    var conpasstip = ConfirmPassword();
    var phonetip = checkPhone();
    var Na = checkName();
    //如果验证成功首先去数据库注册,然后页面跳转
    if(Na&&nametip && passtip && conpasstip && phonetip){
    	 
    	var username = document.getElementById("userName").value;
        var password = document.getElementById("userPasword").value;
        var name = document.getElementById("Name").value;
        var phone = document.getElementById("userPhone").value;
        
        $.ajax({
            type: 'post',
            url: "$/TestOnline/stuRegist?time="+new Date().getTime(),
            dataType: "json",
            data: {"username": username,"password": password,"name":name,"phone":phone},
            success: function (data) {
                var return_aaa = data.return_date;
后面还有 152 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。