php+ajax级联菜单[无刷新级联菜单]_PHP教程
Jul 13, 2016 pm 05:07 PM这一个网友发布的php+ajax级联菜单,我们常说的就是无刷新了。
这一个网友发布的php+ajax级联菜单,我们常说的就是无刷新了。
header("Content-type: text/html;charset=GBK");//输出编码,避免中文乱码
require_once(dirname(__FILE__)."/include/config_base.php");
require_once(dirname(__FILE__)."/include/inc_type.php");
require_once(dirname(__FILE__)."/include/inc_cache.php");
$fatherid="";
$fatherid=$_GET['fatherid'];
if(!empty($fatherid)){
if(!file_exists('/cache/sun_'.$fatherid.'_cache.txt')){
$ty = new Type(0);
$typeOptions = $ty->GetSmallOption($fatherid);
if(!empty($typeOptions)){
cache_write('/cache/sun_'.$fatherid.'_cache.txt', $typeOptions);
echo "
echo $typeOptions;
echo "";
$tl->Close();
}
}else{
$typeOptions=cache_get('/cache/sun_'.$fatherid.'_cache.txt');
echo "
echo $typeOptions;
echo "";
}
}
?>
<script><br />
function GetBigType (){<br />
var url='GetBigType.php';<br />
var pars='pid=1';<br />
var myAjax=new Ajax.Updater('BigType', url, {method:'get', parameters:pars});<br />
}<br />
GetBigType ();<br />
function GetSmallType(){<br />
var fatherid=$F('fatherid');<br />
var url=' GetSmallType.php';<br />
var pars='fatherid='+fatherid;<br />
var myAjax =new Ajax.Updater('SmallType', url, {method:'get', parameters:pars});<br />
}<br />
</script>
header("Content-type: text/html;charset=GBK");//输出编码,避免中文乱码
require_once(dirname(__FILE__)."/include/config_base.php");
require_once(dirname(__FILE__)."/include/inc_type.php");
require_once(dirname(__FILE__)."/include/inc_cache.php");
$pid="";
$pid=$_GET['pid'];
if($pid==1){
if(!file_exists('../cache/bigtype.cache.txt')){
$ty = new Type(0);
$typeOptions = $ty->GetBigOption();
cache_write('/cache/bigtype.cache.txt', $typeOptions);
echo "
echo "rn";
echo $typeOptions;
echo "";
$ty->Close();
}else{
$typeOptions=cache_get('/cache/bigtype.cache.txt');
echo "
echo "rn";
echo $typeOptions;
echo "";
}
}
?>

인기 기사

인기 기사

뜨거운 기사 태그

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











Xiaohongshu에 작품을 게시하는 방법 Xiaohongshu에 기사와 사진을 게시하는 방법

Xiaohongshu는 왜 작품 영상을 공개할 수 없나요? 작품을 어떻게 출판하나요?

Xiaohongshu가 출시되지 않는 이유는 무엇입니까? Xiaohongshu에서 게시한 콘텐츠를 표시할 수 없으면 어떻게 해야 하나요?

GIGABYTE 마더보드에서 키보드 부팅 기능을 설정하는 방법(GIGABYTE 마더보드에서 키보드 부팅 모드 활성화)

Xiaohongshu 릴리스를 삭제하는 방법은 무엇입니까? 삭제 후 복구하는 방법은 무엇입니까?

Xiaohongshu 앱에 작품을 게시하는 방법 5분 만에 Xiaohongshu 앱에 작품 게시 튜토리얼
