我正在尝试在我的应用程序中使用 Childbrowser 插件。我的代码如下:
ChildBrowser.prototype.showWebPage = function(url, options) {
options = options || {
showLocationBar: true,
locationBarAlign: "top"
};
//Code Runs up to this point
cordova.exec(this._onEvent, this._onError, "ChildBrowser", "showWebPage", [url, options]);
};
代码的最后一行什么也没做。它没有给出任何错误,但未显示该网页。我使用的是 Android 2.3。
最佳答案
你似乎定义错误,我认为它应该是这样的:
var url = "http://www.google.com";
window.plugins.childBrowser.showWebPage( url, {showLocationBar: true});// This opens the webpage.
我不太明白你为什么使用 ChildBrowser.prototype.showWebPage
关于javascript - PhoneGap + child 浏览器 + 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13005659/