1 <script type="text/javascript"> 2 var system ={}; 3 var p = navigator.platform; //判断是否为PC 4 system.win = p.indexOf("Win") == 0; 5 system.mac = p.indexOf("Mac") == 0; 6 system.x11 = (p == "X11") || (p.indexOf("Linux") == 0); 7 if(system.win||system.mac||system.xll){ 8 9 } 10 else{ 11 function addNewStyle(news) { 12 var styleElement = document.getElementById('p1'); 13 14 if (!styleElement) { 15 styleElement = document.createElement('style');0 16 styleElement.type = 'text/css'; 17 styleElement.id = 'createElement'; 18 document.getElementsByTagName('head')[0].appendChild(styleElement); 19 } 20 styleElement.appendChild(document.createTextNode(news)); 21 } 22 addNewStyle('.logos{display:none;}') //新添加的样式 23 addNewStyle('.twom{display:none;}') 24 } 25 </script>