Ajax User Logon function Ajax User Logon Ajax user registration Ajax login Ajax detection user name Ajax check user name Ajax function Ajax User Name authentication ASP Ajax User Name authentication Ajax function Ajax ASP login/
Let's talk about the effect of static file login through Ajax today. First, let's take the website login:
This seems to be no different from anything else, but let's take a closer look at it as a static page portal. The effect of successful login on this static page is,This is the column selected for login,
What we want is to look at this. This is the effect of successfully logging on to index.html. However, I want to declare that it is not implemented by the framework, but exactly implemented by Ajax, next let's take a look at its HTML source code. We will issue the code at the end of the file:
<Script language = "JavaScript">
<! --
Function return_member (STR ){
VaR url = '';
Ajaxcreate ();
If (STR = 0 ){
Url = "/member. php? Action = "+ math. Random ();
} Else {
Url = "/user_login.php? Pp = "+ math. Random ();
}
XMLHTTP. Open ("get", URL, true );
XMLHTTP. Send (null );
If (STR = 0 ){
XMLHTTP. onreadystatechange = returnstate;
} Else {
XMLHTTP. onreadystatechange = update_login;
}
}
Function returnstate (){
If (XMLHTTP. readystate! = 4 ){
Document. getelementbyid ("ajax"). innerhtml = "loading data. Please wait ...";
}
If (XMLHTTP. readystate = 4 ){
Document. getelementbyid ("ajax"). innerhtml = XMLHTTP. responsetext;
}
}
Function update_login (){
If (XMLHTTP. readystate = 4 ){
Document. getelementbyid ("pper"). innerhtml = XMLHTTP. responsetext;
}
}
Function loader (){
Return_member ();
}
-->
</SCRIPT>
This code url = "/user_login.php? Pp = "+ math. Random (); this is to send the data to the user_login.php file for processing. In fact, the PHP file is no different from the common login method.