Home  >  Article  >  Web Front-end  >  Tab page interface is implemented using jQuery and Ajax technology (php backend)_jquery

Tab page interface is implemented using jQuery and Ajax technology (php backend)_jquery

WBOY
WBOYOriginal
2016-05-16 18:00:54992browse

There are a lot of tab page codes on the Internet, and the implementations are similar, but the codes are all messy. If you want to really use them, you have to work hard to understand them thoroughly before you can carry out secondary customized development for my use. In fact, it is very simple to implement this Tab page interface. It is just to secretly obtain information through Ajax technology, and then display it in an area in turn (by showing and hiding layers, or reusing a layer, and filling in Html data in turn).
You know the code you develop best, and it should be the easiest to use. If you want to expand it, you won’t get confused. The code is as follows and is still being modified.
The code is as follows:

Copy the code The code is as follows:





我的Tabs选项卡(Ajax版本)
















tab0 tab1 tab2











my_ajax_server.php文件:
代码如下:
复制代码 代码如下:

/*******************************************
* File: my_ajax_server.php
********************************************/
error_reporting(7);
set_magic_quotes_runtime(0);
$app = $_GET['app'];
switch ($app)
{
case “tab0″: //
?>
from TAB0
break;
case “tab1″: //
?>
from TAB1
break;
case “tab2″: //
?>
from TAB2
break;
default:
echo ‘my_ajax_server.php error.';
break;
}
?>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn