Eror。内容/表格不变

时间:2016-04-27 02:59:24

标签: javascript php html

我在网页上有一页关于托福的内容。如果我点击托福,那么内容/表格将改为托福的内容/形式。当我点击“关于托福”的时候。内容正在发生变化,但当我点击“关闭”时,表单/内容不会改变。请帮忙

这是我的网页代码

<!-- Start Page 2 About -->
<div id="page2" class="content"> 
  <div class="container_12">
      <div class="grid_12">
        <div class="slogan">
          <h3>Help your <span>TOEFL</span> Score<em> High</em></h3>
        </div>
      </div>
      <!-- Start menu-form -->
     <form id="menu-form">
      <div class="grid_2">
          <div class="box 60px"> <img src="images/img1.png" alt="">
            <div class="text1"><a href="#page2" onclick="showAboutTOEFL()">About TOEFL</a></div>
          </div>
        </div>
        <div class="grid_2">
           <div class="box 60px"> <img src="images/img2.png" alt="">
            <div class="text1"><a href="#">Tips and Trick</a></div>
          </div>
        </div>
        <div class="grid_2">
          <div class="box 60px"> <img src="images/img8.png" alt="">
            <div class="text1"><a href="#page2" onclick="showAboutTOEFL()">Cambridge</a></div>
        </div><br><br><br><br><br><br><br><br>
        </div>
    </form>  
  <!-- End menu-form -->

        <!-- Start AboutTOEFL-form -->
        <form id="AboutTOEFL-form" style="display:none" class="grid_14">
            <div id="filters" class="sixteen columns">
              <ul class="clearfix">
              <li><a href="#page2" onclick="showAboutTOEFL()">
                <h5>About TOEFL</h5>
                </a></li>
              <li><a href="#" >
                <h5>Tips And Trick</h5>
                </a></li>
              <li><a href="#page2" onclick="showMenuForm()">
                <h5>Close</h5>
                </a></li>
                </ul>
            </div>
          <div class="box 1000px">
            <img src="images/toefl-1.jpg" alt=""><br><br>
              --my text--
          </div>
    </form>
    <!-- End AboutTOEFL-form -->
  </div>
</div>
<!-- End Page 2 -->

这是我的java脚本

<script type="text/javascript">
   var showAboutTOEFL = function() {
      document.getElementById("menu-form").setAttribute("style", "display:none");
      document.getElementById("AboutTOEFL-form").setAttribute("style", "display:block");
    }
  </script>
  <script type="text/javascript">
   var showMenuform = function() {
      document.getElementById("menu-form").setAttribute("style", "display:block");
      document.getElementById("AboutTOEFL-form").setAttribute("style", "display:none");
    }
  </script>

1 个答案:

答案 0 :(得分:0)

foreach ($table as $key => $row) { $billing[$key] = $row['billing']['date_due']; } if ($_GET['billing']=='desc') {array_multisort($billing, SORT_DESC, $table);} else {array_multisort($billing, SORT_ASC, $table);} 事件的大写错误。您有onclick,但您的函数名称为onclick="showMenuForm()" (小写&#34; f&#34;)