Android 链接在我的HTML5应用程序上无法正常工作
我一直在四处奔波,试图运用尽可能多的不同解决方案,试图自己解决这个问题。事实是我不能 我正在AdobePhoneGap上用HTML5开发一个非常简单的应用程序。该应用程序只是一个链接列表,用户应该点击并访问相应的网站。问题问题是这些网站是在应用程序上打开的,而不是在浏览器上打开的。我已经尝试了我知道的一切。。。将目标设置为空、应用和。我也用谷歌搜索过,但结果完全一样:我的问题没有解决方案 一定是我做错了什么,而现在我不认为我有足够的判断力去看到底是什么!这让我发疯。。。代码如下:Android 链接在我的HTML5应用程序上无法正常工作,android,html,cordova,hyperlink,Android,Html,Cordova,Hyperlink,我一直在四处奔波,试图运用尽可能多的不同解决方案,试图自己解决这个问题。事实是我不能 我正在AdobePhoneGap上用HTML5开发一个非常简单的应用程序。该应用程序只是一个链接列表,用户应该点击并访问相应的网站。问题问题是这些网站是在应用程序上打开的,而不是在浏览器上打开的。我已经尝试了我知道的一切。。。将目标设置为空、应用和。我也用谷歌搜索过,但结果完全一样:我的问题没有解决方案 一定是我做错了什么,而现在我不认为我有足够的判断力去看到底是什么!这让我发疯。。。代码如下: <
<!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> </p>
<p> </p>
<footer>
<p>
NL APP version 1.0 - Developed by LFS©
</p>
</footer>
</div>
</body>
</html>
北方景观应用程序
$('.link').live('tap',function()){
url=$(this.attr(“rel”);
加载url(url);
});
函数加载url(url){
navigator.app.loadUrl(url,{openExternal:true});
返回false;
}
NL应用程序1.0版-由LFS和copy开发;
非常感谢您对我的帮助……我已经完成了下面的更改,每个更改都适合我
<!-- 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>
我已经做了以下更改,每一项都适合我
<!-- 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>
非常感谢您的反馈,Marcelo!我不知道你是否正确阅读了我的文章,但正如我所说的,这个解决方案已经被我尝试过了,但没有结果(和其他人一样!!)。因此,我的问题不是我应该做些什么来解决这个问题,而是我做错了什么,因为我找不到任何可行的解决方案!这就是为什么我提供了我的应用程序的全部代码。。。如果我的英语让你感到困惑,我很抱歉。希望你或其他任何人都能得到答案…非常感谢你的反馈,马塞洛!我不知道你是否正确阅读了我的文章,但正如我所说的,这个解决方案已经被我尝试过了,但没有结果(和其他人一样!!)。因此,我的问题不是我应该做些什么来解决这个问题,而是我做错了什么,因为我找不到任何可行的解决方案!这就是为什么我提供了我的应用程序的全部代码。。。如果我的英语让你感到困惑,我很抱歉。希望你或其他人有答案。。。