-1
<div id="content" class="container">
<div class="row">
<div class="col-xs-5 col-md-3">
  <ul class="nav nav-pills nav-stacked">
    <li class="active"><a data-toggle="tab" href="#cap1">Cap.1 - Componenta gospodariei</a></li>
    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">Cap.2<span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li><a data-toggle="tab" href="#cap2a">Cap2a - Terenuri in proprietate</a></li>
        <li><a data-toggle="tab" href="#cap2b">Cap2b - Identificarea pe parcele</a></li>
      </ul>
    </li>

    <li><a data-toggle="tab" href="#cap3">Cap.3 - Modul de utilizare al suprafetelor</a></li>

    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">Cap.4<span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li><a data-toggle="tab" href="#cap4a">Cap4a - Suprafata arabil. pe raza loc.</a></li>
        <li><a data-toggle="tab" href="#cap4a1">Cap4a1 - Supraf. cultivata in sere si solarii</a></li>
        <li><a data-toggle="tab" href="#cap4b1">Cap4b1</a></li>
        <li><a data-toggle="tab" href="#cap4b2">Cap4b2</a></li>
        <li><a data-toggle="tab" href="#cap4c">Cap4c - Supraf. cultivata cu legume</a></li>
      </ul>
    </li>
    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">Cap.5<span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li><a data-toggle="tab" href="#cap5a">Cap5a</a></li>
        <li><a data-toggle="tab" href="#cap5b">Cap5b</a></li>
        <li><a data-toggle="tab" href="#cap5c">Cap5c</a></li>
        <li><a data-toggle="tab" href="#cap5d">Cap5d</a></li>
      </ul>
    </li>
    <li><a data-toggle="tab" href="#cap6">Cap.6 - Suprafete efectiv irigate in camp</a></li>
    <li><a data-toggle="tab" href="#cap7">Cap.7 - Animale domestice si/sau salbatice</a></li>
    <li><a data-toggle="tab" href="#cap8">Cap.8 - Evolutia efectivelor de animale</a></li>
    <li><a data-toggle="tab" href="#cap9">Cap.9 - Utilaje, instal. pt. agric. si silvic. </a></li>
    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">Cap.10<span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li><a data-toggle="tab" href="#cap10a">Cap10a</a></li>
        <li><a data-toggle="tab" href="#cap10b">Cap10b</a></li>
      </ul>
    </li>
    <li><a data-toggle="tab" href="#cap11">Cap.11 - Constructii existente</a></li>
    <li><a data-toggle="tab" href="#cap12">Cap.12 - Atestate de producator</a></li>
    <li><a data-toggle="tab" href="#cap13">Cap.13 - Mentiuni proceduri succesorale</a></li>
    <li><a data-toggle="tab" href="#cap14">Cap.14 - Inregistrari privind preemptiunile</a></li>
    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">Cap.15<span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li><a data-toggle="tab" href="#cap15a">Cap15a</a></li>
        <li><a data-toggle="tab" href="#cap15b">Cap15b</a></li>
      </ul>
    </li>
  </ul>
</div>
<div class="col-xs-7 col-md-9"> 
 <div class="tab-content">
    <div id="cap1" class="tab-pane fade in active">
      <?php include('view_cap1.php');?>
    </div>
    <div id="cap2a" class="tab-pane fade">
      <?php include('view_cap2a.php');?>
    </div>
    <div id="cap2b" class="tab-pane fade">
      <?php include('view_cap2b.php');?>
    </div>
    <div id="cap3" class="tab-pane fade">
      <?php include ('view_cap3.php');?>
    </div>
    <div id="cap4a" class="tab-pane fade">
      <?php include('view_cap4a.php');?>
    </div>
    <div id="cap4a1" class="tab-pane fade">
      <?php include('view_cap4a1.php');?>
    </div>
    <div id="cap4b1" class="tab-pane fade">
      <?php include('view_cap4b1.php');?>
    </div>
    <div id="cap4b2" class="tab-pane fade">
      <?php include('view_cap4b2.php');?>
    </div>
    <div id="cap4c" class="tab-pane fade">
      <?php include('view_cap4c.php');?>
    </div>
    <div id="cap5a" class="tab-pane fade">
      <?php include('view_cap5a.php');?>
    </div>
    <div id="cap5b" class="tab-pane fade">
      <?php include('view_cap5b.php');?>
    </div>
    <div id="cap5c" class="tab-pane fade">
      <?php include('view_cap5c.php');?>
    </div>
    <div id="cap5d" class="tab-pane fade">
      <?php include('view_cap5d.php');?>
    </div>
    <div id="cap6" class="tab-pane fade">
      <?php include('view_cap6.php');?>
    </div>
    <div id="cap7" class="tab-pane fade">
      <?php include('view_cap7.php');?>
    </div>
    <div id="cap8" class="tab-pane fade">
      <?php include('view_cap8.php');?>
    </div>
    <div id="cap9" class="tab-pane fade">
      <?php include('view_cap9.php');?>
    </div>
    <div id="cap10a" class="tab-pane fade">
      <?php include('view_cap10a.php');?>
    </div>
    <div id="cap10b" class="tab-pane fade">
      <?php include('view_cap10b.php');?>
    </div>
    <div id="cap11" class="tab-pane fade">
      <?php include('view_cap11.php');?>
    </div>
    <div id="cap12" class="tab-pane fade">
      <?php include('view_cap12.php');?>
    </div>
    <div id="cap13" class="tab-pane fade">
      <?php include('view_cap13.php');?>
    </div>
    <div id="cap14" class="tab-pane fade">
      <?php include('view_cap14.php');?>
    </div>
    <div id="cap15a" class="tab-pane fade">
      <?php include('view_cap15a.php');?>
    </div>
    <div id="cap15b" class="tab-pane fade">
      <?php include('view_cap15b.php');?>
    </div>
  </div>
</div>
</div>
</div>

好的,所以我有上面的代码,它正在工作,除了它说“cap3”。当我点击 cap3 药丸时,选项卡内容中没有任何内容,我看不出我的代码有什么问题。我把它贴在这里,也许有人比我看得更清楚。

4

1 回答 1

0

我做了一个 jsFiddle 是有效的。唯一的区别是我用字符串替换了 PHP 包含。

<div id="content" class="container">
<div class="row">
<div class="col-xs-5 col-md-3">
  <ul class="nav nav-pills nav-stacked">
    <li class="active"><a data-toggle="tab" href="#cap1">Cap.1 - Componenta gospodariei</a></li>
    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">Cap.2<span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li><a data-toggle="tab" href="#cap2a">Cap2a - Terenuri in proprietate</a></li>
        <li><a data-toggle="tab" href="#cap2b">Cap2b - Identificarea pe parcele</a></li>
      </ul>
    </li>

    <li><a data-toggle="tab" href="#cap3">Cap.3 - Modul de utilizare al suprafetelor</a></li>

    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">Cap.4<span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li><a data-toggle="tab" href="#cap4a">Cap4a - Suprafata arabil. pe raza loc.</a></li>
        <li><a data-toggle="tab" href="#cap4a1">Cap4a1 - Supraf. cultivata in sere si solarii</a></li>
        <li><a data-toggle="tab" href="#cap4b1">Cap4b1</a></li>
        <li><a data-toggle="tab" href="#cap4b2">Cap4b2</a></li>
        <li><a data-toggle="tab" href="#cap4c">Cap4c - Supraf. cultivata cu legume</a></li>
      </ul>
    </li>
    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">Cap.5<span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li><a data-toggle="tab" href="#cap5a">Cap5a</a></li>
        <li><a data-toggle="tab" href="#cap5b">Cap5b</a></li>
        <li><a data-toggle="tab" href="#cap5c">Cap5c</a></li>
        <li><a data-toggle="tab" href="#cap5d">Cap5d</a></li>
      </ul>
    </li>
    <li><a data-toggle="tab" href="#cap6">Cap.6 - Suprafete efectiv irigate in camp</a></li>
    <li><a data-toggle="tab" href="#cap7">Cap.7 - Animale domestice si/sau salbatice</a></li>
    <li><a data-toggle="tab" href="#cap8">Cap.8 - Evolutia efectivelor de animale</a></li>
    <li><a data-toggle="tab" href="#cap9">Cap.9 - Utilaje, instal. pt. agric. si silvic. </a></li>
    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">Cap.10<span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li><a data-toggle="tab" href="#cap10a">Cap10a</a></li>
        <li><a data-toggle="tab" href="#cap10b">Cap10b</a></li>
      </ul>
    </li>
    <li><a data-toggle="tab" href="#cap11">Cap.11 - Constructii existente</a></li>
    <li><a data-toggle="tab" href="#cap12">Cap.12 - Atestate de producator</a></li>
    <li><a data-toggle="tab" href="#cap13">Cap.13 - Mentiuni proceduri succesorale</a></li>
    <li><a data-toggle="tab" href="#cap14">Cap.14 - Inregistrari privind preemptiunile</a></li>
    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">Cap.15<span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li><a data-toggle="tab" href="#cap15a">Cap15a</a></li>
        <li><a data-toggle="tab" href="#cap15b">Cap15b</a></li>
      </ul>
    </li>
  </ul>
</div>
<div class="col-xs-7 col-md-9"> 
 <div class="tab-content">
    <div id="cap1" class="tab-pane fade in active">
      1
    </div>
    <div id="cap2a" class="tab-pane fade">
      2a
    </div>
    <div id="cap2b" class="tab-pane fade">
      2b
    </div>
    <div id="cap3" class="tab-pane fade">
      3
    </div>
    <div id="cap4a" class="tab-pane fade">
      4a
    </div>
    <div id="cap4a1" class="tab-pane fade">
      4a1
    </div>
    <div id="cap4b1" class="tab-pane fade">
      4b1
    </div>
    <div id="cap4b2" class="tab-pane fade">
      4b2
    </div>
    <div id="cap4c" class="tab-pane fade">
      4c
    </div>
    <div id="cap5a" class="tab-pane fade">
      5a
    </div>
    <div id="cap5b" class="tab-pane fade">
      5b
    </div>
    <div id="cap5c" class="tab-pane fade">
      5c
    </div>
    <div id="cap5d" class="tab-pane fade">
      5d
    </div>
    <div id="cap6" class="tab-pane fade">
      6
    </div>
    <div id="cap7" class="tab-pane fade">
      7
    </div>
    <div id="cap8" class="tab-pane fade">
      8
    </div>
    <div id="cap9" class="tab-pane fade">
     9
    </div>
    <div id="cap10a" class="tab-pane fade">
      10a
    </div>
    <div id="cap10b" class="tab-pane fade">
      10b
    </div>
    <div id="cap11" class="tab-pane fade">
      11
    </div>
    <div id="cap12" class="tab-pane fade">
      12
    </div>
    <div id="cap13" class="tab-pane fade">
      13
    </div>
    <div id="cap14" class="tab-pane fade">
      14
    </div>
    <div id="cap15a" class="tab-pane fade">
      15a
    </div>
    <div id="cap15b" class="tab-pane fade">
      15b
    </div>
  </div>
</div>
</div>
</div>

https://jsfiddle.net/372qpps2/

我确实注意到 #3 的包含在它和其他行没有的括号之间确实有一个空格。我不相信这会有所作为,但你可以试试。

根据工作示例,我会说您的问题与 view_cap3.php 中的代码有关。

于 2016-06-27T17:58:25.420 回答