如何使工作目标=" _blank"在InAppBrowser的iPhone上。 我试试:
var app = {
// Application Constructor
initialize: function() {
this.bindEvents();
},
// Bind Event Listeners
//
// Bind any events that are required on startup. Common events are:
// 'load', 'deviceready', 'offline', and 'online'.
bindEvents: function() {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
// deviceready Event Handler
//
// The scope of 'this' is the event. In order to call the 'receivedEvent'
// function, we must explicitly call 'app.receivedEvent(...);'
onDeviceReady: function() {
app.receivedEvent('deviceready');
},
// Update DOM on a Received Event
receivedEvent: function(id) {
cordova.InAppBrowser.open('http://192.168.1.3/mobilesiteapp/', '_blank', 'location=no,toolbar=no,presentationstyle=fullscreen,toolbarposition=top,clearsessioncache=no,hidden=yes');
}
};
但它不起作用。它只适用于target =" _system"。但如果我使用它,我就无法隐藏网址和底部浏览器工具栏。如何解决?
答案 0 :(得分:0)
您已指定hidden = yes,这将隐藏浏览器窗口。请尝试以下方法:
cordova.InAppBrowser.open('http://192.168.1.3/mobilesiteapp/', '_blank', 'location=no,toolbar=no,presentationstyle=fullscreen');