<script> alert(window.navigator.userAgent); if(window.navigator.userAgent.indexOf("Windows NT")>-1){ alert("window系统"); }else if (window.navigator.userAgent.indexOf("Mac")>-1){ alert("Mac系统"); }else{ alert("其它系统"); } </script>
<script> alert(window.navigator.userAgent); if(window.navigator.userAgent.indexOf("Windows NT")>-1){ alert("window系统"); }else if (window.navigator.userAgent.indexOf("Mac")>-1){ alert("Mac系统"); }else{ alert("其它系统"); } </script>
转载于:https://www.cnblogs.com/zwnet/p/3423696.html