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:
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;
}
?>