【www.gdgbn.com--jquery】

<script src="../admin/js/jquery/jquery-1.2.6.js" type="text/javascript"></script>
<script language="javascript">
$(
  function(){
  $("#collegeid").change(
     function(){       
              $("#professional").load("plugins/mycollege/mycollege_select.inc.php?collegeid="+$("#collegeid").val());
          }
               );
    }
);
</script>

//注意以下地方,所有的标签的名字是以id为标准
       
        //这地方的span标签可以换成div
         
        
        

3>Load 的那个文件输出的就是一个文件
require_once "../../include/common.inc.php";
require_once "mycollege.function.php";
//判断用户是否登录
if (!$discuz_uid)
{
  showmessage("not_loggedin", "logging.php?action=login");
}
  //这里面就是我自己的一些数据库操作,根据情况换成自己的数据操作
  $collegeid=intval($collegeid);
  $professionallist=getProfessionallist($collegeid);
  header("Cache-Control: no-cache");
$str="";
  echo $str;
?>

jquery插件下载地址

本文来源:http://www.gdgbn.com/wangyezhizuo/19728/