During the development project, the front-end encountered two concealed problems.
Problem 1: The ie url parameter in the IE7 browser is too long, causing an HTTP status 122 error.
Cause: there is no problem in ie6.8, but the get parameter is too long in IE7. Google says, "Don't use the get method in Ajax apps, if you can void it, because IE7 craps out with more than 2032 characters in a get string"
Solution:
Change the jsonp get data method of the original project to the conventional post data method.
 
Question 2. This scope Problem
Cause: if this is not a large window object in the object, this indicates the Ajax object of the current domain name.
Solution:
 
Copy content from PHP code to clipboard 
 
 - VaR test = {};
- Test. getflash = 2;
- Test. Test = function (){
- Alert (this. getflash); // 2
- $. Ajax ({
- Type: "Post ",
- URL: "Some. php ",
- Data: "name = John & location = Boston ",
- Success: function (MSG ){
- Alert (this. getflash); // equals to undefine
- }
- });
- }
- Solution:
- Test. Test = function (){
- VaR thisvalue = this;
- Alert (thisvalue. getflash); // 2
- $. Ajax ({
- Type: "Post ",
- URL: "Some. php ",
- Data: "name = John & location = Boston ",
- Success: function (MSG ){
- Alert (thisvalue. getflash); // 2
- }
- });
- }