简体   繁体   中英

Dynamic change of content in tabs

<?php --this is my index page--
header('Content-Type: text/html; charset=iso-8859-1');
  include ('Header.php');
  include ('Navigation.php');
  include ('Content.php');
  include ('Footer.php');
?>

<section class="tabs"> --this is my navigation tab--
  <ul class="links1lvl">
     <li class="active"><a>About</a>
        <ul class="links2lvl">
           <li class="active"><a href="../about/who.html">O nás</a></li>

I'm creating a new web and I need help with some coding. The idea is, that I have 2 sections. First for tabs to choose desired content and second as place to display actual content.

The thing is, I've found a ton of guides but those inlude the content of all tabs on that index page, but I have 20+ pages so that's unreal. What I desire is a page, where only the actual content would change as I click different tabs, without refreshing the whole page AND wich is loaded from ,,external" html/php files. Now I don't need code, I will gladly learn as much as I can on my own, thing I need however is a direction. Where should I look for solution.

You need to use AJAX. This will allow you to trigger a call to an external file via Javascript, and display the result onto the current page without the need to refresh.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM