登录页面代码:<%@ page language="C#" autoeventwireup="true" inherits="System_Login, App_Web_tdipjflg" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>会员登录</title>    <script type="text/javascript" src="../Javascript/CreateRandomCode.js"></script>
<script type="text/javascript" src="JavaScript/public.js"></script>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.login_x{background-image: url(/index/login.jpg);background-repeat: no-repeat; margin:auto; width:1003px;}
-->
</style>
</head>
<body style="background: #016BA9;" onload="document.form1.txtName.focus();">
<div class="login_x">
    <noscript>
        <iframe src="*.html"></iframe>
    </noscript>
    <form id="form1" runat="server">
        <div class="login_01">
        </div>
        <div class="area">
            <div class="login_02">
<table width="307" border="0">
  <tr>
    <td width="100"><table width="100" border="0" cellpadding="0" cellspacing="0">
            <tr>
                        <td width="100" align="left">
                            <input type="text" id="txtName" name="txtName" runat="server" class="inputUser" /></td>
                    </tr>
                    <tr>
                        <td align="left">
                            <input type="password" id="txtPassword" runat="server" name="Password" class="inputUser" /></td>
                    </tr>
                    <tr>
                        <td align="left">
                            <input id="logincode" type="text" class="inputCode" size="6" />
                            <img id="imgCode" src="../ValidateCode.aspx" onclick="resetRandomCode1(this);" align="absMiddle"
                                style="margin-bottom: 8px;" />                            <script type="text/javascript">
                                    var img=document.getElementById("imgCode");
                                    resetRandomCode1(img);
                                    document.getElementById("txtName").focus();
                            </script>                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                    </tr>
                </table></td>
    <td width="104"><asp:Button ID="btnLogin" runat="server" CssClass="login_btn" OnClientClick="return check();" OnClick="btnLogin_Click" /></td>
  </tr>
</table></div>
           
        </div>
    </form>
</div>
</body>
</html><script type="text/javascript">
    function check()
    {
        if(document.getElementById("txtName").value.length==0)
        {
            alert("请填写会员帐号");
            document.getElementById("txtName").focus();
            return false;
        }
        if(document.getElementById("txtPassword").value.length==0)
        {
            alert("请填写登录密码");
            document.getElementById("txtPassword").focus();
            return false;
        }       
        if(document.getElementById("logincode").value=="")
        {
            alert("请填写验证码!");
            document.getElementById("logincode").focus();
            return false;
        }
        if(document.getElementById("logincode").value!=document.getElementById("imgCode").name)
        {
            alert("验证码有误!");
            document.getElementById("logincode").focus();
            return false;
        }         
        return true;
    }
</script>这是.js$(function(){            
        $("input[type='text']").keypress(function(){
            if(event.keyCode==39)return false;
        });
        
        $("#aLogin").click(function(){
            Login();
        });
        
        var name=getCookie("MemberName");
        if(name!=null)
        {
            $("#txtName").val(name);
        }
    });
function Login()
{
    var name=$("#txtName").val();
    var pwd=$("#txtPwd").val();
    var saveName=$("#cbSaveName").attr("checked");
    if(name=="")
    {
        alert("请填写编号!");
        $("#txtName").focus();
        return;
    }
    if(pwd=="")
    {
        alert("请填写密码!");
        $("#txtPwd").focus();
        return;
    }    
    if(saveName)
    {
        SetCookie("MemberName",name);
    }
    $.get(
        "Ajax.aspx",
        {key:"Login",name:escape(name),password:escape(pwd),n:Math.random()},
        function(result){                                         
            if(result!="err")
            {                
                setSession(result);                  
            }
            else
            {
                alert("用户名或密码错误!");
            }                           
        }
    );

function SetCookie(name,value)
{
    var Days = 7; //此 cookie 将被保存 Days 天
    var exp  = new Date();    //new Date("December 31, 9998");
    exp.setTime(exp.getTime() + Days*24*60*60*1000);
    document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString() + ";path=/";
}function getCookie(name)//取cookies函数        
{
    var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
     if(arr != null) return unescape(arr[2]); return null;}function delCookie(name)//删除cookie
{
    var exp = new Date();
    exp.setTime(exp.getTime() - 1);
    var cval=getCookie(name);
    if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
}

解决方案 »

  1.   

    就是登录进去闪了一下!!http://www.gbrwpp.com/system/login.aspx  网站管理用户名:admin
    密码:vhgn22517051 它这个貌似是用js直接做的,找不到。cs
      

  2.   

    这一段是longin涉及到的那个public.js
    //加入收藏夹function AddFavorite()
    {    try
        {
            window.external.addFavorite(document.URL, document.title);
        }
        catch (e)
        {
            try
            {
                window.sidebar.addPanel(document.title, document.URL, "");
            }
            catch (e)
            {alert(e);
                //alert("加入收藏失败,请使用Ctrl+D进行添加");
            }
        }
    }//function AddFavorite(sURL, sTitle)
    //{
    //    try
    //    {
    //        window.external.addFavorite(sURL, sTitle);
    //    }
    //    catch (e)
    //    {
    //        try
    //        {
    //            window.sidebar.addPanel(sTitle, sURL, "");
    //        }
    //        catch (e)
    //        {
    //            //alert("加入收藏失败,请使用Ctrl+D进行添加");
    //        }
    //    }
    //}function SetFontSize(id,size)
    {
        document.getElementById(id).style.fontSize=size;
    }
    function killErrors() {
    return true;
    }
    window.onerror =killErrors;var fileLocation=parent.document.location.href.toLowerCase();
    if(fileLocation.indexOf("default.aspx")==-1 && fileLocation.indexOf("reg/regist.asp")==-1&& fileLocation.indexOf("clickad.aspx")==-1&& fileLocation.indexOf("login.aspx")==-1&& fileLocation.indexOf("registinfo.aspx")==-1) {
        parent.document.location.href="Login.aspx";//用户没有在线转到登录页面
    }document.oncontextmenu=new Function("event.returnValue=false;");
      

  3.   


    var fileLocation=parent.document.location.href.toLowerCase();
    改为:
    var fileLocation=parent.location.toLowerCase();parent.document.location.href="Login.aspx";
    改为:
    parent.location.replace("Login.aspx");
      

  4.   

     parent.document.location.href="Login.aspx";//用户没有在线转到登录页面
    为什么每次登录都找不到在线的用户??
      

  5.   

    var fileLocation=parent.document.location.href.toLowerCase();
    改为:
    var fileLocation=parent.location.toLowerCase();parent.document.location.href="Login.aspx";
    改为:
    parent.location.replace("Login.aspx");改完还是没用啊