【发布时间】:2012-03-08 15:34:41
【问题描述】:
我有一个带有 WebView 的应用程序。在 web 视图中,该应用程序向用户显示了一个 Internet 页面,该页面具有启动我的应用程序的链接,但在另一个 Activity 中。 在 html 页面中,我正在做类似的事情
<a href="my.special.scheme://other/parameters/here"></a>
一切都很好,但我需要用 Javascript 做同样的事情。所以我正在这样做:
<html>
<head>
<script>
function redirect(n){
window.location = n;
}
</script>
</head>
<body>
<button id="target" onClick="redirect('my.special.scheme://other/parameters/here')" >Name</button>
</body>
</html>
但是什么也没发生。 我正在使用 Android 1.6
有什么建议吗?
【问题讨论】:
标签: android android-layout webview