2017-08-07 111 views
-2

Here's the first page that the a href='' code is working .<a href=''> not working on the other pages

moneypro.online/website-design

<div class="row animate-box fadeInUp animated-fast"> 
      <!-- Tabs --> 
     <div class="gtco-tab-content tab-content animated-fast active fadeIn" data-tab-content="1"> 
      <div class="col-md-6"> 
       <div class="gtco-video gtco-bg gtco-image img-responsive" style="background-image: url(/WebsiteDesign.png); background-size: contain; "> 
       </div> 
      </div> 
      <div class="col-md-6"> 
       <h2>Website Design</h2> 
         <p>As a business start with an idea, an online identity starts with a design concept. Here at Euro ITS we listen to client business goals and incorporate it within our design. Together with our knowledge of digital marketing, our website designs are: </p> 
         <div class="row"> 
          <div class="col-md-12"> 
           <h4>✔ Responsive</h4> 
          </div> 
          <div class="col-md-12"> 
           <h4>✔ User oriented</h4> 
          </div> 

          <div class="col-md-12"> 
           <h4>✔ Search engine ready</h4> 
          </div> 
         </div> 
       <div class="row"> 
        <div class="col-md-4"> 
         <a href="/contact"><button type="button" class="btn btn-success btn-block">Appointment</button></a> 
        </div> 
        <div class="col-md-4"> 
         <a href="#"><button type="button" class="btn btn-info btn-block">Inquiry</button></a> 
        </div> 
        <div class="col-md-4"> 
         <a href="/pricing"><button type="button" class="btn btn-warning btn-block">Pricing</button></a> 
        </div> 
       </div> 
      </div> 
     </div> 

    </div> 

and here is the other page that the a href='' code does not work.

moneypro.online/services

<div class="gtco-tab-content-wrap" style="height: 643px;" data-section="services"> 
       <div class="gtco-tab-content tab-content animated-fast active fadeIn" data-tab-content="1"> 
        <div class="col-md-6 col-sm-12 col-xs-12"> 
         <div class="gtco-video gtco-bg img-responsive" style="background-image: url(assets/public/images/icons/WebsiteDesign.png); background-size: contain; "> 
         </div> 
        </div> 
        <div class="col-md-6 col-sm-12 col-xs-12"> 
         <div class="row"> 
          <div class="col-md-12"> 
           <div class="panel"> 
            <div class="panel panel-heading panel-cust-bg"> 
             <h2 class="cust-txt"><strong>Website Design</strong></h2> 
            </div> 
            <div class="panel-body"> 
             <div class="row"> 
              <div class="col-md-12"> 
               <p>As a business start with an idea, an online identity starts with a design concept. Here at Euro ITS we listen to client business goals and incorporate it within our design. Together with our knowledge of digital marketing, our website designs are: </p> 
              </div> 
             </div> 
             <div class="row"> 
              <div class="col-md-12"> 
               <h4>✔ Responsive</h4> 
              </div> 
              <div class="col-md-12"> 
               <h4>✔ User oriented</h4> 
              </div> 

              <div class="col-md-12"> 
               <h4>✔ Search engine ready</h4> 
              </div> 
             </div> 
            </div> 
           </div>         
          </div> 
         </div> 

         <div class="row"> 
          <div class="col-md-4"> 
           <a href="/contact" class="btn btn-success btn-block" role="button" >Appointment</a> 
          </div> 
          <div class="col-md-4"> 
           <a href="#" class="btn btn-info btn-block" role="button">Inquiry</a> 
          </div> 
          <div class="col-md-4"> 
           <a href="/pricing" class="btn btn-warning btn-block" role="button">Pricing</a> 
          </div> 
         </div> 
        </div> 
       </div> 

they're are exactly the same and i don't know why the other page is working . here's the live website of it live example

有人可以请解释给我。

回答

0

每个href元素都需要一个对应的锚点,它应该是一个名称或id属性,并且它必须匹配/存在于页面中。 This example由w3schools显示良好的做法href

+0

你甚至没有尝试检查你的例子页吗?你的回答对这个问题无效 – Mindless

+0

@Mindless从提供的源代码中,我无法看到正确的锚点使用/正确使用'href'。所以,我假设它为什么在'moneypro.online/website-design'中工作的原因是由于某些服务器端代码没有显示在@Paul Kevin Macandili – Tim1234

2

好,这里是两者之间的区别:

工作:

<a href="/contact"> 
    <button type="button" class="btn btn-success btn-block"> 
     Appointment 
    </button> 
</a> 

不工作:

<a href="/contact" class="btn btn-success btn-block" role="button"> 
    Appointment 
</a> 

你加入BTN到 “一” 的标签类,并将其认为标签是一个按钮,所以它忽略了href属性。

+0

我试着在这两个页面上工作,但其他页面仍然没有'工作。我想这是一个JavaScript冲突的问题? –

+0

嗯,这很奇怪。我看到两个页面都有相同的javascript冲突 – Mindless

+0

我想我会尝试一个javascript onclick。但我太伤心了,导致它不干净的权利? –

相关问题