【发布时间】:2014-06-02 00:24:22
【问题描述】:
我正在使用启用了 javascript 的 webview,因为我的应用程序需要它。 我的问题是在我的 webview 中加载 url 时需要避免弹出窗口有没有办法做到这一点?
我遇到了 onJsAlert() 方法,但根据 androids 文档
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.
这不是我想要的。我想避免弹出窗口和警告框(包括提示和确认) 任何帮助将不胜感激
谢谢!
【问题讨论】: