[英]How to open mobile browser on Javascript?
How to open mobile browser on javascript? 如何在JavaScript上打开移动浏览器?
I have an App. 我有一个应用程序。 I want to open a link to the external browser.
我想打开一个指向外部浏览器的链接。
Here's the code that I did: 这是我做的代码:
window.open('www.twitter.com,', '_blank');
But it's not working. 但这不起作用。
Here's some additional code: 这是一些其他代码:
function(e)
{
navigator.notification.alert(
'Please login to Twitter to share your score.',// message
function()
{
window.open('www.twitter.com,', '_blank');
},// callback
'Twitter Login',// title
'Ok'// buttonName
);
})
Thanks in advance! 提前致谢!
Set your target to _system
将目标设置为
_system
window.open("https://www.facebook.com", "_system");
If that doesn't work try the standard _blank
. 如果这样不起作用,请尝试使用标准
_blank
。
window.open("https://www.facebook.com", "_blank");
I used this in my PhoneGap app and it works for me 我在PhoneGap应用中使用了它,对我有用
window.open('http://192.168.1.140/meplan/uploads/ielts-writing-prepositions.pdf', '_blank');
// use your facebook url it will work //使用您的Facebook网址,它将起作用
You can see the Phonegap documentation here that might be helpful to you 您可以在此处查看Phonegap文档,这可能会对您有所帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.