Today in the study of Microsoft testing site http://www.start.com/1, this is an online Rss reading test site, more people are concerned that the entire site is based on the refreshing, its main functions make code even more sweaty, and are all generated by the client JavaScript (app. js), referencing two common js files: msncore. js (core class library implementing ajax) and msncompat. js (it should be an adapter for a non-IE browser), and downloaded its javascript code. I don't know if it is a non-public ajax class library by Microsoft.
Download msncore. js and msncompat. js
In addition, there is a syntax worth noting in its page call.
<! [If! IE]>
<Script src = "MSNCompat. js? V = 0.042005.0 "> // Only required in Firefox </script>
<! [Endif]>
<Script type = "text/javascript" src = "msncore. js? V = 0.042005.1 "> </script>
Obviously, it is a conditional compilation command. If it is not an IE browser, it is first compiled by MSNCompat. js makes some extensions to some browser system classes to be compatible with the calling format of IE. It is more concise than using a lot of if else to judge the browser type and execute different code.
I am going to take a closer look at msncore. js. You may wish to take a closer look at it ~