gpt4 book ai didi

javascript - PhoneGap + child 浏览器 + 错误

转载 作者:太空狗 更新时间:2023-10-29 13:33:38 24 4
gpt4 key购买 nike

我正在尝试在我的应用程序中使用 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com