I am having trouble with my Store < a href> I want it to redirect to the store page which is on a different site. it works when you right click it and select "Open Tab" or "Open new tab", but not when you regularly click it. I've tried moving around different things and checking to see if everything's right.
Thanks.
<!-- Navigation panel ================================================== -->
<nav class="main-nav dark transparent menu fixed">
<div class="transparent wrapper relative clearfix">
<!-- Main Menu -->
<div class="nav-wrapper large-nav float-left">
<ul class="clearlist">
<!-- Item With Sub -->
<li>
<a href="http://mylink.abc"class="active">Store</a>
</li>
<!-- End Item With Sub -->
</ul>
</div>
<!-- End Main Menu -->
</div>
</nav>
<!-- End Navigation panel -->
答案 0 :(得分:1)
查看行号script.js
上的643
文件和646
有return false
声明。
删除该声明。
因为它是通过点击链接触发的,它返回false。在return false
事件中onClick
的链接不会将您带到相应的href
答案 1 :(得分:0)
我尝试删除&#34; http&#34;它的工作原理!还有&#34; https&#34;有用。虽然很奇怪!
success
&#13;
答案 2 :(得分:0)
答案 3 :(得分:0)
第二:你应该看看浏览器控制台。也许会出现这个错误:
拒绝展示&#39; https://www.google.com.vn/?gfe_rd=cr&ei=5w1mWMz2LZHD8AfEkbWABQ&gws_rd=ssl&#39;在一个框架中因为它设置了X-Frame-Options&#39;到&#39; SAMEORIGIN&#39;。
您的目标链接不允许从其域外加载。
答案 4 :(得分:0)
var fruits = ['b','a' ,'c' ,'e' ,'d'];
document.getElementById("demo").innerHTML = fruits;
function myFunction() {
fruits.sort();
fruits.splice(2,1);
fruits.splice(0, 0, 'c');
document.getElementById("demo").innerHTML = fruits;
}
在<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
事件中返回script.js
,以此false
弃置默认行为:
click
答案 5 :(得分:-1)
HREF = “http://mylink.abc” 类= “活性”
嗯,href和class之间应该有一个空格,或者可能是我的浏览器加载此评论的问题。