js的navigator对象

来源:互联网 发布:淘宝达人资历说明案例 编辑:程序博客网 时间:2024/05/17 23:31

js的navigator对象


<!DOCTYPE html><html><head lang="en">    <meta charset="UTF-8">    <title>mischen</title>    <script>        function method(){            var c=window.navigator.userAgent.toLowerCase();            if(c.indexOf("msie")>0){                alert("您使用的是微软的ie浏览器");            }else if(c.indexOf("firefox")>0){                alert("您用的是火狐");            }else {                alert("不知道");            }        }        method();    </script></head><body></body></html>


0 0