I am using inAppBrowser plugin in my cordova app.
I want to load external url in webview.
Here is my code of www/index.html
file
<!DOCTYPE html>
<html>
<head>
<title>InAppBrowser.addEventListener Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
var ref = window.open('https://www.google.com', '_blank', 'location=no,toolbar=no'); //This is working
var ref = window.open('https://www.google.com', '_self'); //This is not working
}
</script>
I don't know why this is happening.
I added inappbrowser plugin.
您可能想尝试cordova.InAppBrowser.open()
而cordova.InAppBrowser.open()
window.open()
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.