2

是否可以从 bb 10 中的 Webview 返回值?
示例:如果我在我的应用程序中加载用于网上银行的 Webview,并且有没有办法获取从 Webview 返回到应用程序的一些数据(如付款参考号)

4

2 回答 2

1

At first you have to add a javascript in the html file that return document.documentElement.innerHTML; After completely loading the webview call evaluateJavaScript (const QString &script, bb::cascades::JavaScriptWorld::Typeworld world) function, this will evaluate the javascript in the webview. Lastly you should catch the sigal "javaScriptResult" from this signal you can get all the source of html file as qvariant.

于 2013-05-21T05:28:43.600 回答
0

为了安全起见,您无法访问 webview 的 html 内容,除非您自己将其设置为字符串。

您可以访问重定向 url,但没有 Post 参数。

于 2013-04-13T07:27:15.223 回答