1
我想使用最新版Cordova附带的In App Browser。但是,我无法弄清楚如何使用我的Xcode进行设置。如何在应用程序浏览器中触发Cordova/PhoneGap
伊夫添加示例代码到我的HTML文件:
// Wait for Cordova to load
document.addEventListener("deviceready", onDeviceReady, false);
// Cordova is ready
function onDeviceReady() {
var ref = window.open('http://apache.org', '_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); });
}
但我对如何触发它不确定当按钮被点击:
<a href="#">Click Me</a>
会有人知道如何正确设置?