HTML Code:
 if (navigator.appName == "Microsoft Internet Explorer") {
begin = navigator.userAgent.indexOf("MSIE ") +
"MSIE ".length;
if(navigator.userAgent.indexOf(";", begin) > 0) {
end = navigator.userAgent.indexOf(";", begin);
} else {
end = navigator.userAgent.indexOf(")", begin)
+ 2;
}
document.getElementById("targetDiv").innerHTML =
"You are using Internet Explorer " +
navigator.userAgent.substring(begin, end);
}
}
i don't know why there added an else part? what's the meaning and effect of it? thank you,