【问题标题】:External links are not working in phonegap apk外部链接在phonegap apk中不起作用
【发布时间】:2018-11-05 11:46:12
【问题描述】:

外部链接在 phonegap apk 中不起作用。我开始在 phonegap 中开发我的应用程序并通过 phonegap 桌面应用程序查看它工作正常,然后我开始在 phonegap 构建中生成 apk 然后我发现外部链接无法正常工作并且所以我的字体样式(字体系列)也不同。我试图通过窗口打开命令来纠正它,但窗口打开命令也不起作用。

$(".footer ").on('click','#facebook',function(){

         window.open("https://facebook.com/");
    });
    $("#twitter").click(function(){
               window.open("https://twitter.com/");
    });
    $("#instagram").click(function(){
               window.open("https://www.instagram.com/");
    });

【问题讨论】:

    标签: android cordova cordova-plugins phonegap inappbrowser


    【解决方案1】:

    安装cordova-plugin-inappbrowser并将代码更改为:

    $(".footer ").on('click','#facebook',function(){
         window.open("https://facebook.com/", "_system", "");
    });
    $("#twitter").click(function(){
               window.open("https://twitter.com/", "_system", "");
    });
    $("#instagram").click(function(){
               window.open("https://www.instagram.com/", "_system", "");
    });
    

    https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-03
      相关资源
      最近更新 更多