gpt4 book ai didi

android - 链接在我的 HTML5 应用程序上无法正常工作

转载 作者:行者123 更新时间:2023-11-30 03:41:22 25 4
gpt4 key购买 nike

我一直在兜兜转转,尝试应用尽可能多的不同解决方案,尝试自己解决这个问题。事实是我做不到!

我正在 Adob​​e PhoneGap 上用 HTML5 开发一个非常简单的应用程序。该应用程序只是用户应单击并访问相应网站的链接列表。问题?问题是网站是在应用程序而不是浏览器上打开的。我已经尝试了我所知道的一切...设置目标 _blank,已应用 this solution , this one , this onethis one .我也一直在谷歌搜索,但结果完全一样:我的问题没有解决方案。

一定是我哪里做错了,现在我觉得我没有辨别力,看不出到底是什么!这让我发疯......这是代码:

    <!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>

非常感谢我能得到的任何帮助...

最佳答案

我已完成以下更改,每一项都适合我。

<!-- 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>

关于android - 链接在我的 HTML5 应用程序上无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15669462/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com