[英]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. 问题是,我发现了大量的指南,但那些内容包含了索引页面上所有标签的内容,但我有20多页,所以这是不真实的。 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. 我想要的是一个页面,其中只有实际的内容会随着我点击不同的标签而改变,而不刷新整个页面并且从外部“html / php文件”加载。现在我不需要代码,我会很乐意我尽可能多地学习,但我需要的是一个方向。我应该在哪里寻找解决方案。
You need to use AJAX. 你需要使用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. 这将允许您通过Javascript触发对外部文件的调用,并将结果显示在当前页面上而无需刷新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.