var Client = {
Engine: {'name': 'unknown', 'version': ''},
Features: {}
};
Client.Features.xhr = !!(window.XMLHttpRequest);
Client.Features.xpath = !!(document.evaluate);
if (window.opera) Client.Engine.name = 'opera';
else if (window.ActiveXObject) Client.Engine = {'name': 'ie', 'version': (Client.Features.xhr) ? 7 : 6};
else if (!navigator.taintEnabled) Client.Engine = {'name': 'webkit', 'version': (Client.Features.xpath) ? 420 : 419};
else if (document.getBoxObjectFor != null) Client.Engine.name = 'gecko';
Client.Engine[Client.Engine.name] = Client.Engine[Client.Engine.name + Client.Engine.version] = true;
Client.Engine.ie = true; //IE浏览器,版本不限
Client.Engine.ie6 = true; //IE 6
Client.Engine.ie7 = true; //IE 7
Client.Engine.opera = true; //opera
Client.Engine.gecko = true; //Mozilla/Gecko(包括firefox)
Client.Engine.webkit = true; //Safari
Client.Engine.webkit419 = true; //Safari2
Client.Engine.webkit420 = true; //Safari3
Client.Engine.ie6 = true; //IE 6
Client.Engine.ie7 = true; //IE 7
Client.Engine.opera = true; //opera
Client.Engine.gecko = true; //Mozilla/Gecko(包括firefox)
Client.Engine.webkit = true; //Safari
Client.Engine.webkit419 = true; //Safari2
Client.Engine.webkit420 = true; //Safari3
为了让
if (Client.Engine.ie7 == true) { event.returnValue = false; } else { return false; }