Not exactly what you want, but close to it:
var jscriptVersion = /*@cc_on @if(@_jscript) @_jscript_version @else @*/ false /*@end @*/;
var geckoVersion = navigator.product === 'Gecko' && navigator.productSub;
var operaVersion = 'opera' in window && 'version' in opera && opera.version();
The variables will contain the appropriate version or false
if it is not available.
I'd appreciate it if someone using Chrome could find out if you can use window.chrome
in a similar way to window.opera
.