In the last two days of projects, Ajax is often used to Create Ajax objects using normal Js. Since my brother became obsessed with jquery, he wrote things and found kung fu with JQ, but he still made mistakes.
There are two errors in calling the Ajax method by using JQ below. I hope you can keep them in mind.
$. Ajax ({
Type: "Post", // Ajax Request Method
URL: URL, // Ajax request address
Datatype: "JSON", // accept the JSON Data Format
Contenttype: "application/JSON; UTF-8", // sets the Data Transmission Character Set
Data: "picid =" + picid + "& Title =" + title + "& catid_one =" + catid_one + "& catid_two =" + catid_two + "& Action = next ", // pass the post Parameter
Timeout: 25000, // set the timeout value
Error: showerror, // Ajax call failure Function
Success: showpic_info, // Ajax call success Function
});
Error 1 I seem to have been fooled by an unknown JQ manual.
Data: "picid =" + picid + "& Title =" + title + "& catid_one =" + catid_one + "& catid_two =" + catid_two + "& Action = next ", // pass the post parameter and find that passing the parameter in this way is a big error. This should be post in the form of a parameter passed by the get method.
It should be as follows:
Data: {picid: picid, Title: title, catid_one: catid_one, catid_two: catid_two, Action: 'Next'}, // pass the post Parameter
More than 2 errors, success: showpic_info,
// Ajax call success function $. Ajax ({.....}); There is no ending point in the braces ", I don't know why I accidentally wrote it. Isn't it my habit of developing code over the years? e ........... A mess of Failures
Alas, I still don't know how to solve the problem when I encountered this problem. I just saw Firefox completely normal, firebug monitoring, and IE, but it was a crash. I think Firefox never prompts JavaScript errors. there are JS syntax errors, and then you can observe the Code for a long time, it seems that there should not be another .... Hey, you're done.
If you have any JQ problems with these two minor issues, please note that