小编Tor*_*orK的帖子

从Ipad phonegap应用程序在外部浏览器中打开网页

可能重复:
phonegap:在Safari中打开外部链接而不是应用程序的UIWebView

我为我的Ipad制作了一个HTML5应用程序.这是通过phonegap原生的.在我的应用程序中,我有som外部链接到网页.但是,当我打开这些链接时,外部网页会在我的应用程序中打开,而且由于我的Ipad没有"后退按钮",因此无法返回我的应用程序.即使我关闭应用程序,然后再次打开它,外部网页也会打开.

我试图用一个儿童浏览器解决问题,但我也遇到了同样的问题.这是我使用的代码:

openChildBrowser('http://en.wikipedia.org/wiki/Lapis_lazuli',{ showLocationBar: true });">text here</a>
Run Code Online (Sandbox Code Playgroud)

和:

<a onclick= "window.plugins.childBrowser.showWebPage('http://en.wikipedia.org/wiki/Lapis_lazuli',{showLocationBar: true});">text here</a>
Run Code Online (Sandbox Code Playgroud)

我当然经常尝试一下href.有没有人能解决我的问题?谢谢你的时间 :)

html5 ipad cordova

3
推荐指数
1
解决办法
2844
查看次数

SQLite查询中的javascript for循环

我创建了一个函数,它将从我的DB返回字符串"path".

    function getAudio(mid, cb) {
    //mid is an array containing the id to some multimedia files.
    for(i=0; i < mid.length; i++) {

        db.transaction(function(tx) {
                tx.executeSql('SELECT * FROM Multimedia WHERE Mid=' + mid[i] + ' AND Type=' + 2, [], function(tx, results) {    
                //type=2 is audio. (type=1 is picture file etc) There is only one audiofile in the array.
                    if(results.rows.length > 0) {
                        path = results.rows.item(0).Path; 
                        cb(path);
                    }
                }, errorCB);
        }, errorCBQuery);

    }//end for
}//end getAudio()
Run Code Online (Sandbox Code Playgroud)

当我删除for循环时,查询成功,当for循环在那里时,调用errorCBQuery或errorCB.

有想法该怎么解决这个吗?谢谢 :)

javascript sqlite

2
推荐指数
1
解决办法
3097
查看次数

标签 统计

cordova ×1

html5 ×1

ipad ×1

javascript ×1

sqlite ×1