In JavaScript programming, developers usually need to write many small programs to implement some specific functions. For example, browser detection, string processing, array editing, etc. jQuery summarizes these commonly used programs and provides many practical functions.
1. Detect browser.
jQuery obtains browser information through the $.browser object.
Property Description
msie If it is ie, it is true, otherwise it is false
mozilla is true if it is a mozilla-related browser, otherwise false
safari If it is Safari browser, it is true, otherwise it is false
poera If it is opera browser, it is true, otherwise it is false
version browser version number
When used, developers can directly call these properties to obtain browser properties. As follows: