admin管理员组

文章数量:1562458

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>隐藏手机浏览器地址栏</title> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,minimal-ui"/> <meta name="apple-mobile-web-app-capable" content="yes"/> <meta name="apple-touch-fullscreen" content="no"/> <style type="text/css">     body{   line-height:40px;  } </style> </head> <body>  1<br/>2<br/>3<br/>4<br/>5<br/>6<br/>7<br/>8<br/>9<br/>  1<br/>2<br/>3<br/>4<br/>5<br/>6<br/>7<br/>8<br/>9<br/>  1<br/>2<br/>3<br/>4<br/>5<br/>6<br/>7<br/>8<br/>9<br/>  1<br/>2<br/>3<br/>4<br/>5<br/>6<br/>7<br/>8<br/>9<br/>  <script type="text/javascript">     function hideAddressBar_ios(){    if(document.documentElement.scrollHeight <= document.documentElement.clientHeight) {     bodyTag = document.getElementsByTagName('body')[0];     bodyTag.style.height = document.documentElement.clientWidth / screen.width * screen.height + 'px';    }    setTimeout(function(){     window.scrollTo(0, 1);    }, 100);   };   function hideAddressBar_android(){    var n = navigator.userAgent;    if(n.match(/UCBrowser/i)){     //uc浏览器     hideAddressBar_ios();     return false;    }    var self = document.getElementsByTagName('body')[0];    if (self.requestFullscreen) {     self.requestFullscreen();    } else if (self.mozRequestFullScreen) {     self.mozRequestFullScreen();    } else if (self.webkitRequestFullScreen) {     self.webkitRequestFullScreen();    }   };   window.addEventListener("load",function(){    navigator.userAgent.match(/Android/i) ? hideAddressBar_android() : hideAddressBar_ios();   });  </script> </body> </html>

本文标签: 地址栏浏览器代码手机