getBrowserVersionNumber (XSPUserAgent - JavaScript™)
Gets the version of the browser as a number.
Syntax
getBrowserVersionNumber() : double
Return value | Description |
---|---|
double |
The version number of the browser, or 0.0. |
Usage
If the return value is an empty string, you must analyze XSPUserAgent (JavaScript).A browser version number is carried only to one decimal position.
To get the version as a string see getBrowserVersion (XSPUserAgent - JavaScript).
Examples
This computed field displays a message depending on the browser version if the browser is IE:var ua = context.getUserAgent();
if(ua.isIE() && ua.getBrowserVersionNumber() < 7.0) {
return "You should upgrade your browser. Now running " +
ua.getBrowser() + " version " + ua.getBrowserVersion();
}