3,Login(登录,登录失败登录框抖动)

3,Login(登录,登录失败登录框抖动)

创新互联建站专注为客户提供全方位的互联网综合服务,包含不限于网站建设、成都网站设计、雁峰网络推广、微信小程序、雁峰网络营销、雁峰企业策划、雁峰品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;创新互联建站为所有大学生创业者提供雁峰建站搭建服务,24小时服务热线:18982081108,官方网址:www.cdcxhl.com

------------Default.aspx(只有前台,异步登录)

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_3_登录框_摇头效果__Default" %>






    
     
    
    
    
    


    
        $(function () {
            $("#myusername").live("blur", function () {
                if ($(this).val() == "") {
                    $("#myusernamex").text("*");
                }
                else {
                    $("#myusernamex").text("");
                }
            });
            $("#mypassword").live("blur", function () {
                if ($(this).val() == "") {
                    $("#mypasswordx").text("*");
                }
                else {
                    $("#mypasswordx").text("");
                }
            });

        });

        function showlogin() {
            var dialog = art.dialog({
                content: '

用户名:  

'          + '

密   码:  

'          + '用户名或密码错误    自动登录     忘记密码

',                 fixed: true,                 id: 'Fm7',                 title:'登录窗口',                 lock:true,                 okVal: '确定登录',                 ok: function () {                     var myusername = document.getElementById('myusername');                     var mypassword = document.getElementById('mypassword');                     if (myusername.value == "" || mypassword.value == "") {                         dialog.shake && dialog.shake(); // 调用抖动接口                         $("#tishi").show();                         $("#myusernamex").text("*");                         $("#mypasswordx").text("*");                         return false;                     }                     $.get("LoginManage.ashx", { "myusername": myusername.value, "mypassword": mypassword.value, "ren": Math.random() }, function (data) {                         if (data == "ok") {                             $("#tishi").hide();                             //====================================================================登录成功(操作)                             location.href = "http://localhost:37424/artDialog/qweqe/Default.aspx";                         }                         else {                             $("#tishi").show();                             dialog.shake && dialog.shake(); // 调用抖动接口                             mypassword.select();                             mypassword.focus();                             return false;                         }                     });                     return false;                 },                 cancel: true             });         }                                                                                   

------LoginManage.ashx

<%@ WebHandler Language="C#" Class="LoginManage" %>

using System;
using System.Web;

public class LoginManage : IHttpHandler {
    
    public void Proce***equest (HttpContext context) {
        context.Response.ContentType = "text/plain";

        string myusername = context.Request.QueryString["myusername"];
        string mypassword = context.Request.QueryString["mypassword"];
        if (myusername == "123" && mypassword == "123")
        {
            context.Response.Write("ok");
        }
        else
        {
            context.Response.Write("no");
        }
        
        
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}

3,Login(登录,登录失败登录框抖动)

 

源代码下载地址:http://down.51cto.com/data/1968050
技术学习群(发展中,群成员免费提供资源。欢迎大家加入):426634651


文章标题:3,Login(登录,登录失败登录框抖动)
文章起源:http://pwwzsj.com/article/ieeehd.html