非常简单<a href=""> link isn&#39;t working (works when right clicked)

时间:2016-12-30 07:02:13

标签: html css hyperlink href

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

6 个答案:

答案 0 :(得分:1)

查看行号script.js上的643文件和646return false声明。

删除该声明。

因为它是通过点击链接触发的,它返回false。在return false事件中onClick的链接不会将您带到相应的href

答案 1 :(得分:0)

我尝试删除&#34; http&#34;它的工作原理!还有&#34; https&#34;有用。虽然很奇怪!

&#13;
&#13;
success
&#13;
&#13;
&#13;

答案 2 :(得分:0)

它适用于我的电脑。

当鼠标输入这样的标签时,它能显示地址吗? enter image description here

如果无法显示悬停样式,其他TAG可能会显示在其上方。

答案 3 :(得分:0)

您的目标链接不允许从其域外加载。

答案 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之间应该有一个空格,或者可能是我的浏览器加载此评论的问题。