<script type="text/javascript"> //判断浏览器类型 function CheckBrowser() { var cb; var Sys = {}; var ua = navigator.userAgent.toLowerCase(); window.ActiveXObject ? Sys.ie = ua.match(/msie ([\d.]+)/)[1] : document.getBoxObjectFor ? Sys.firefox = ua.match(/firefox\/([\d.]+)/)[1] : window.MessageEvent && !document.getBoxObjectFor ? Sys.chrome = ua.match(/chrome\/([\d.]+)/)[1] : window.opera ? Sys.opera = ua.match(/opera.([\d.]+)/)[1] : window.openDatabase ? Sys.safari = ua.match(/version\/([\d.]+)/)[1] : 0; //以下进行测试 if (Sys.ie) cb = 'IE: ' + Sys.ie; if (Sys.firefox) cb = 'Firefox: ' + Sys.firefox; if (Sys.chrome) cb = 'Chrome: ' + Sys.chrome; if (Sys.opera) cb = 'Opera: ' + Sys.opera; if (Sys.safari) cb = 'Safari: ' + Sys.safari; return cb; } </script>