case 1
function CheckBrowser(){
var cb = "Unknown";
if(window.ActiveXObject){
cb = "IE";
}else if(navigator.userAgent.toLowerCase().indexOf("firefox") != -1){
cb = "Firefox";
}else if((typeof document.implementation != "undefined") && (typeof document.implementation.createDocument != "undefined") && (typeof HTMLDocument != "undefined")){
cb = "Mozilla";
}else if(navigator.userAgent.toLowerCase().indexOf("opera") != -1){
cb = "Opera";
}
return cb;
}
case 2;[align=left][/align]
if (window.XMLHttpRequest) { //Mozilla, Safari,...IE7
alert('Mozilla, Safari,...IE7 ');
if(!window.ActiveXObject)// Mozilla, Safari,...
{
alert('Mozilla, Safari');
}
else
{
alert('IE7');
}
}
else
{
alert('IE6');
}
function CheckBrowser(){
var cb = "Unknown";
if(window.ActiveXObject){
cb = "IE";
}else if(navigator.userAgent.toLowerCase().indexOf("firefox") != -1){
cb = "Firefox";
}else if((typeof document.implementation != "undefined") && (typeof document.implementation.createDocument != "undefined") && (typeof HTMLDocument != "undefined")){
cb = "Mozilla";
}else if(navigator.userAgent.toLowerCase().indexOf("opera") != -1){
cb = "Opera";
}
return cb;
}
case 2;[align=left][/align]
if (window.XMLHttpRequest) { //Mozilla, Safari,...IE7
alert('Mozilla, Safari,...IE7 ');
if(!window.ActiveXObject)// Mozilla, Safari,...
{
alert('Mozilla, Safari');
}
else
{
alert('IE7');
}
}
else
{
alert('IE6');
}