1

私は、この問題を自分で解決しようと、できるだけ多くの異なる解決策を適用しようと、何度も何度も何度も行ってきました。事実は私ができないということです!

Adobe PhoneGap で HTML5 で非常にシンプルなアプリを開発しています。このアプリは、ユーザーがクリックしてそれぞれの Web サイトにアクセスする必要があるリンクのリストにすぎません。問題?問題は、Web サイトがブラウザーではなくアプリで開くことです。私はすでに私が知っているすべてを試しました...ターゲット_blankを設定し、この解決策これこれ、およびこれを適用しました。私もグーグルで検索しましたが、結果はまったく同じです。私の問題の解決策はありません。

私が何か間違ったことをしているに違いありません、そして今、私にはそれが何であるかを見分ける識別力がないと思います! そして、それは私を夢中にさせています...コードは次のとおりです。

    <!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />

        <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
        Remove this if you use the .htaccess -->

        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

        <title>Northern Landscape APP</title>
        <meta name="description" content="Northern Landscape APP - With this APP you can keep up with the latest news of our group: Features, Group Messages, new magazine issues and more!" />
        <meta name="author" content="LFS" />

        <meta name="viewport" content="width=device-width; initial-scale=1.0" />

        <!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->

        <link rel="shortcut icon" href="/favicon.ico" />
        <link rel="apple-touch-icon" href="/apple-touch-icon.png" />

        <link rel="stylesheet" href="style.css">

        <script type="text/javascript">
  $('.link').live('tap', function() {
    url = $(this).attr("rel");   
    loadURL(url);
});

function loadURL(url){
    navigator.app.loadUrl(url, { openExternal:true });
    return false;
} 
        </script>

    </head>

    <body>
        <div id="contentor">

            <header>

            </header>

            <nav>

            <div id="cabeca">
              <img src="imgs/cabecalho.png"> 
            </div>

            <br>
            <br>
            <br>
            <div id="botoeswraper">

              <div id="linha1">

                <div id="b1">
                  <div id="icone"><img src="imgs/logo_compus.png"></div>
                  <div id="texto">
                  <a href="#" class='link' rel='http://www.northernlandscape.org'>Official Website</a> </div>
                </div>

              </div>

              <div id="linha2">

                <div id="b2">
                  <div id="icone"><img src="imgs/rblogo.png"></div>
                  <div id="texto">
                  <a href="#" class='link' rel='http://www.redbubble.com/groups/northern-landscape'>Redbubble group</a> </div>
                </div>

              </div>

              <div id="linha3">

                <div id="b3">
                  <div id="icone"><img src="imgs/groupmsg.png"></div>
                  <div id="texto">
                  <a href="#" class='link' rel='http://www.redbubble.com/groups/northern-landscape/forums/7330'>Group messages</a> </div>
                </div>

               </div>

               <div id="linha4">

                 <div id="b4">
                  <div id="icone"><img src="imgs/issues.png"></div>
                  <div id="texto">
                   <a href="#" class='link' rel='http://www.northernlandscape.org/alli.php'>All NL magazine issues</a> </div>
                 </div>

               </div>

               <div id="linha5">

                 <div id="b5">
                   <div id="icone"><img src="imgs/tweeter.png"></div>
                   <div id="texto">
                   <a href="#" class='link' rel='https://twitter.com/NL_host'>Check us on Tweeter</a> </div>
                 </div>

              </div>

              </div>

            </nav>

<p>&nbsp;</p>
<p>&nbsp;</p>

            <footer>
                <p>
                    NL APP version 1.0 - Developed by LFS&copy; 
                </p>
            </footer>
        </div>
    </body>
</html>

私が得ることができるどんな助けにも感謝します...

4

1 に答える 1

1

以下の変更を行いましたが、それぞれがうまくいきます。

<!-- Opens in new tab -->
<a href="http://www.northernlandscape.org" target="_blank">Official Website</a>

<!-- Opens in new window -->
<a href="#" onClick="window.open('http://www.redbubble.com/groups/northern-landscape', '_system', 'location=yes');">Redbubble group</a>
于 2013-10-23T17:51:59.477 に答える