Recently, I found that a 360 browser is very annoying, in compatibility mode.
Code:
<A href = "#" onclick = 'doaudit (1) '> review </a>
Clicking does not have any effect. I tried none of my browsers.
So I thought the compatibility mode would change to IE6.
So I changed it to a variety of writing methods.
<A href = "javascript: void (0)" onclick = 'doaudit (1); Return false; '> review </a>
And so on.
Later, I slowly calmed down, commented out the paragraph, and found that, relying on it, it turned out that after adding $. Post, a didn't respond.
Later, I found someone answered the question.
360 the Ajax return value will be cached. Add a timestamp to the URL and try again.
Therefore
The original code is as follows:
<A href = "#" onclick = doaudit (1) '> review </a>
<SCRIPT>
Function doaudit (ID ){
// Review
If (type = 1 ){
$. Post ("/ajaxapp/commonajaxquery. ashx", {A: "Audit", ID: Id}, function (data, textstatus ){
If (Data! = NULL ){
}
Else
Alert ("data error, please contact the Administrator ");
});
</SCRIPT>
In compatibility mode, click the connection, there is no reflection, and adding alert () above for debugging does not reflect any
Add a random timestamp (TS) to the end)
$. Post ("/ajaxapp/commonajaxquery. ashx", {A: "Audit", ID: ID, TS: Math. Random ()}
Now.
You can write it like this.
$. Post ("/ajaxapp/commonajaxquery. ashx? TS = "+ math. Random (), {A:" Audit ", ID: Id}
It took two hours to finally solve the problem perfectly.
360 the browser compatibility mode cannot be $. Post (not a connection onclick problem !!)