如何隐藏在Android的网页的地址栏? [英] How to hide the address bar of a webpage in android?

查看:177
本文介绍了如何隐藏在Android的网页的地址栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  <一href="http://stackoverflow.com/questions/4068559/removing-address-bar-from-browser-to-view-on-android">Removing从浏览器(查看在Android)

我试图运行Android的基于Web的应用程序,我想在运行应用程序隐藏的网页地址栏。那可能吗?我该怎么做呢?

I'm trying to run a web-based application in Android, and I want to hide the webpage address bar while running the application. Is that possible? How do I do it?

推荐答案

在文档加载执行这个JavaScript将滚动浏览器下来,让地址栏在屏幕之外:

Executing this JavaScript on document load will scroll the browser down so that the address bar is off screen:

window.scrollTo(0, 1);

这可能是一样好,你会去写一个原生的Andr​​oid应用程序中的的WebView 来显示你的Web应用程序。

That's probably as good as you're going to get without writing a native Android app with a WebView to display your webapp in.

编辑: 请注意,这仅适用于旧的默认Android浏览器。它不与浏览器工作。

Note that this only works for the old default Android browser. It does not work with Chrome.

这篇关于如何隐藏在Android的网页的地址栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆