In the morning, I did some tests. When I got the page to Firefox, there were a bunch of problems. The page layout was not mentioned. The Javascript code problem was a headache, for example:
1. document. all () does not work in FF. It must be changed to document. getElementById ();
2. obj. innerText = "XXX"; in FF, it seems that there are occasional problems. Change to obj. innerHTML = "XXX.
3. var olE = document. body. onload; the onload function for retrieving the body. IE No problem. FF no problem. Change it to window. onload. solution.
What is the difference between window. onload and body. onload? It will be available for Baidu.
4. in IE, The. event object has the x and y attributes. FF does not have. event. x. It should be the event. pageX in FF.
Solution:. mX = event. x? Event. x: event. pageX; then use mX instead of event. x.
5. the most hateful thing is that Ajax cannot be called synchronously in FF !!!
For example, xmlHttp. open ("get", "xxx. aspx? Id = xx ", true); // true indicates asynchronous
No problem in IE and FF. But xmlHttp. open ("get", "xxx. aspx? Id = xx ", false); no problem in IE. It won't work in FF !!
No solution has been found for this problem.
6. I want to eat. It's not over yet ..
-----------
5th solved.
This is the case when synchronous calls are performed.
The Code is as follows:
XmlHttp. open ("get", "xxx. aspx? Id = xx ", false );
Xmlhttp. send (null );
If (xmlhttp. readyState = 4 ){
If (xmlhttp. status = 200 ){
// Alert (xmlhttp. responseText );
} Else {
Alert ("the page you requested has an exception. ");
}
}