I have the following code:
var N = navigator.appName, ua = navigator.userAgent, tem;
var M = ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?d+(\.\d)*)/i);
if (M && (tem = ua.match(/version\/([\.\d]+)/i)) != null) M[2] = tem[1];
M = M ? [M[1], M[2]] : [N, navigator.appVersion, '-?'];
document.write(M);
Gives me the output:
Chrome,24.0.1312.56
I was wondering if it was possible to show only the version type so like this:
24.0.1312.56
I Don’t know how to do this with this code i found it on the internet.
Change
document.write(M);todocument.write(M[1]);