File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<!DOCTYPE html>
2- < html >
2+ < html lang =" en " >
33< head >
4- < title > </ title >
4+ < meta charset ="utf-8 " />
5+ < title > Ajax</ title >
56</ head >
67< body >
8+ < div id ="new "> </ div >
79
10+ < script src ="../js/addLoadEvent.js "> </ script >
11+ < script src ="../js/getHTTPObject.js "> </ script >
12+ < script src ="../js/getNewContent.js "> </ script >
813</ body >
914</ html >
Original file line number Diff line number Diff line change 1+ This was loaded asynchronously!
Original file line number Diff line number Diff line change 1+ /**
2+ * Created by M.Jin on 14-7-2.
3+ */
4+ function addLoadEvent ( func ) {
5+ var oldonload = window . onload ;
6+ if ( typeof window . onload != 'function' ) {
7+ window . onload = func ;
8+ } else {
9+ window . onload = function ( ) {
10+ oldonload ( ) ;
11+ func ( ) ;
12+ }
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ /**
2+ * Created by M.Jin on 14-7-2.
3+ */
4+ function getHTTPObject ( ) {
5+ if ( typeof XMLHttpRequest == "undefined" )
6+ XMLHttpRequest = function ( ) {
7+ try { return new ActiveXObject ( "Msxml2.XMLHTTP.6.0" ) ; }
8+ catch ( e ) { }
9+ try { return new ActiveXObject ( "Msxml2.XMLHTTP.3.0" ) ; }
10+ catch ( e ) { }
11+ try { return new ActiveXObject ( "Msxml2.XMLHTTP" ) ; }
12+ catch ( e ) { }
13+ return false ;
14+ }
15+ return new XMLHttpRequest ( ) ;
16+ }
Original file line number Diff line number Diff line change 1+ /**
2+ * Created by M.Jin on 14-7-2.
3+ */
You can’t perform that action at this time.
0 commit comments