相关疑难解决方法(0)

在Android webview中禁用弹出窗口和警告框

我正在使用带有javascript的webview,因为它在我的应用程序全天候是必需的.我的问题是我需要避免弹出窗口,而在我的webview中加载url是否有办法做到这一点?

我遇到了onJsAlert()方法但是根据orroids文档

 Tell the client to display a javascript alert dialog.
 If the client returns true, WebView will assume that the client will handle the dialog.
 If the client returns false, it will continue execution.
Run Code Online (Sandbox Code Playgroud)

这不是我想要的.我想避免弹出窗口和警告框(包括提示和确认)任何帮助将不胜感激

谢谢!

html java android webview

6
推荐指数
2
解决办法
6946
查看次数

标签 统计

android ×1

html ×1

java ×1

webview ×1