我在ios中使用Phonegap2.9.0,我已经完成了内浏览器 .and的教程,我在我的应用程序中尝试了以下步骤
App.js调用方法
indexpnl.element.on({
tap: function (e) {
var el = Ext.get(e.target);
var bval = el.getId();
if (bval == "btnfacebook") {
// onDeviceReady()//using this application screen its self loading the site view not in inappbrowser
document.addEventListener("deviceready",onDeviceReady, false);//here nothing happening
}
}
});jsfunction.js方法
function onDeviceReady()
{
var ref = window.open('http://www.facebook.com', '_blank', 'location=yes');
ref.addEventListener('loadstart', function() { alert('start: ' + event.url); });
ref.addEventListener('loadstop', function() { alert('stop: ' + event.url); });
ref.addEventListener('exit', function() { alert(event.type); });
}我已经把插头包括在config.xml里了
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>当我使用上述方法调用nothing happens.When时,我在onDeviceReady()上调用该站点正在加载应用程序itslef,但没有在inapp browser.What中加载我的代码。
发布于 2013-11-14 00:16:56
不知道,但你检查过了吗
<script src="phonegap.js"></script> 在您的脚本中,如
https://build.phonegap.com/docs/plugins-using
把它排除在外会产生这种错误。
https://stackoverflow.com/questions/18615620
复制相似问题