For a question about ajax, see the following HTML code: & nbsp; & lt; tr & gt; & nbsp; & lt; td & nbsp; align = "right" & gt; & lt; strong & gt; member number: & lt;/stron about ajax.
HTML code:
Member ID:
Js code:
Function get_user_jifen (user_name ){
If (user_name = ""){
// Document. getElementById ('User _ jifen'). innerHTML = "the user name cannot be blank ";
$ ("# User_jifen" ).html ("username cannot be blank ");
Return false;
} Else {
$. Ajax ({
Type: "POST ",
Url: "user_jifen.php ",
DataType: "html ",
Data: "act = ajax & user_name =" + user_name,
Success: function (msg ){
$ ("# User_jifen" ).html (msg );
},
Error: function ()
{
$ ("# User_jifen" ).html ("query error ");
}
});
}
}
After running, the error message is always displayed in the ajax module:
How can this problem be solved?
------ Solution --------------------
Change to $ _ POST.
Or you have not entered the elseif field.
------ Solution --------------------
User_jifen.php does not exist
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service