【问题标题】:open a link new tab not working in android, but working from chrome and firefox?打开一个链接 新标签不能在 android 中工作,但可以在 chrome 和 firefox 中工作?
【发布时间】:2017-06-12 03:36:47
【问题描述】:

我在 phonegap 和 jquery mobile 中有项目,在我的项目中,我想用 android 浏览器在我的 android 中打开一个链接,但它不起作用,但是当我在 windows 上打开我的浏览器(firefox 和 chrome)的链接时作品?有什么问题?

这是我的javascript:

function displayIstilah(data) {
    var istilah = data.item;
    console.log(istilah);
    $('#GambarPic').attr("src", '' + istilah.gambar);
    $('#fullName').text(istilah.istilah);
    $('#Keterangan').text(istilah.keterangan);
    if (istilah.vidio) {
        $('#actionList').append('<li><a href="' + istilah.vidio + '" target="_system" location="yes"><h3>Vidio</h3>' +
                '<p>' + istilah.vidio + '</p></a></li>');
    }

    $('#actionList').listview('refresh');

}

和html:

<body>

<div id="detailsPage" data-role="page" data-add-back-btn="true">

    <div data-role="header">
        <h1>Istilah Astronomi</h1>
    </div>

  <div data-role="content"> 

    <img id="GambarPic"/>
    <div id="istilahdetails">
       <h3 id="fullName"></h3>
       <p id="Keterangan"></p>
       <p id="vidio" target="_system" location="yes"></p>
    </div>

    <ul id="actionList" data-role="listview" data-inset="true"></ul>

  </div>

</div>

【问题讨论】:

  • 您在 android 设备上尝试了哪种浏览器?预装的?尝试使用 Chrome Android。

标签: javascript jquery html cordova jquery-mobile


【解决方案1】:

您需要使用inAppBrowser 插件从您的phonegap 应用程序在浏览器中打开链接。

【讨论】:

    猜你喜欢
    • 2012-11-03
    • 2014-02-15
    • 1970-01-01
    • 2013-12-27
    • 1970-01-01
    • 2013-12-26
    • 2019-02-27
    • 1970-01-01
    • 2016-02-28
    相关资源
    最近更新 更多