栏目导航
热点推荐
- 流行的70个AJAX演示及下载
- 20个Ajax关键议题
- AJAX技术在PHP开发中的简单应用
- 如何选择使用AJAX的最佳时机
- 一日精通Ajax技术
- [四天学会ajax] 学习Ajax教程第
- [四天学会ajax] 学习Ajax教程第
- ajax的server部分(php版)
- 在Ajax 应用程序中实现数据之间
- 解决AJAX 跨域访问完整解决方案
- Ajax获取页面被缓存的解决方案
- ajax检测用户名
阅览排行
Ajax实现无刷新树
www.jz123.cn 2008-09-21 来源: 中国建站 袁袁整理 我要投递新闻
1.建立一个aspx页面
html代码
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>小山</title>
<link type="text/css" href="../../Styles/tree_css/tree.css" rel="stylesheet">
</head>
<body>
<form id="Form1" runat="server">
<table width=100% cellpadding=0 cellspacing=0 border=0>
<colgroup>
<col width=180 />
<col />
</colgroup>
<tr>
<td>
<div class="TreeMenu" id="CategoryTree" style="width: 100%; height: 489px">
</div>
</td>
<td>
<iframe id=furl height=20 style="height: 497px; width: 100%;"></iframe>
</td>
</tr>
</table>
<script language="jscript">
function el(id)
{
return document.getElementById(id);
}
function ExpandSubCategory(iCategoryID)
{
var li_father = el("li_" + iCategoryID);
if (li_father.getElementsByTagName("li").length > 0) //分类已下载
{
ChangeStatus(iCategoryID);
return;
}
li_father.className = "Opened";
switchNote(iCategoryID, true);
AjaxMethod.GetSubCategory(iCategoryID, GetSubCategory_callback);
}
function GetSubCategory_callback(response)
{
var dt = response.value.Tables[0];
if (dt.Rows.length > 0)
{
var iCategoryID = dt.Rows[0].FatherID;
上一篇:Ajax实现在textbox中输入内容,动态从数据库中模糊查询显示到下拉框中 下一篇:解决ajax跨域问题的实例