// 下在是判断mac和widow的方法 let isSystem= function(){ /** * 是否为mac系统 * */ let isMac = function() { return 'mac系统'+/macintosh|mac os x/i.test(navigator.userAgent); }(); /** * 是否为windows系统 * */ let isWindows = function() { return 'window'+/windows|win32/i.test(navigator.userAgent); }(); console.log("是否MAC系统"+isMac," , "+"是否window系统"+isWindows) return 'isSys'; }(); // isSystem(); console.log(isSystem) })(this,function(){ 下面是自己的工具代码 })
原文地址:https://www.cnblogs.com/andy-lehhaxm/p/10360163.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。