MyTreeÊ÷¿Ø¼þ_AjaxʵÏÖÒì²½¼ÓÔؽڵã
×î½üÒ»Ö±ÔÚÑ°ÕÒÒ»¸ö±È½Ï·½±ãºÃÓõÄÊ÷¿Ø¼þ£¬MyTreeÊ÷¿Ø¼þ²¢Ã»ÓÐÌṩºÜ¶àÆäËûµÄ¹¦ÄÜ£¬µ«ÔÚAjaxÒì²½¼ÓÔؽڵãÉÏʵÏֵĺܼò½à£¬Áô×÷±¸Íü¡£
MyTreeµÄÏÂÔصØÖ·£ºhttp://www.itplus.com.cn/myTree/
ÏÂÔغó Demo£ºAjaxÒì²½¼ÓÔØÀý×Ó
Document£ºÎĵµ
myTree£º·ÅÏîÄ¿ÀïÒªÒýÓõÄÎļþ
MytreeTest.aspxÒ³
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MytreeTest.aspx.cs" Inherits="VistaToNewSchol.MytreeTest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<script language="javascript" src="../myTree/myTree.js"></script>
<script language="javascript" src="../myTree/bingo.js"></script>
<script language="javascript">
var tree;
window.onload = function(){
tree = new myTree("myFirstTree", "divTree", "../myTree/", "Blue");
tree.datafrom = "MyTreeGetNode.aspx"
tree.load();
}
function myFirstTree_onClick(prmNodeId){
tree.load(prmNodeId);
tree.expandNode(prmNodeId);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="divTree"></div>
<div id="divStr"></div>
</form>
</body>
</html>
&
Ïà¹ØÎĵµ£º
ÊÓƵÏÂÔصØÖ·
£º http://dwz.duqn.com/doc/dwz-ajax-develop.swf
ajax ±íµ¥Ìá½»¡¢·ÖÒ³×é¼þ
´ó¼ÒÔÚʹÓÃDWZ¿ò¼Ü¹ý³ÌÖÐÓöµ½ÎÊÌâ×î¶àµÄÒ²ÊÇajax±íµ¥Ìá½»´¦ÀíÁ÷³Ì¡¢·ÖÒ³×é¼þÎÊÌâ¡£±¾½Ì²ÄÖ÷ÒªÊǽ²½âDWZ¿ò¼Ü±íµ¥Ìá½»¡¢·ÖÒ³µÈajax½»»¥ÔÀíºÍ¹æ·¶¡£DWZÆäËü×é¼þÕâÀï²»ÔÙ½²½âÁË£¬´ó¼ÒÈ¥¿´DWZÓû§ÊֲᣬÌرðÊǵÚÒ»´ÎʹÓÃÒ» ......
ÕâÁ½Ìì¸Õ½â¾öÁËajax¶àä¯ÀÀÆ÷¼æÈݵÄÎÊÌ⣬Ö÷Òª¾ÍÕë¶ÔFirefoxµÄ£¬¿ªÊ¼»¹ÒÔΪFirefox²»Ö§³ÖajaxÄØ£¨±ðЦÎÒѽ£¬²»ÔõôÁ˽âFirefoxҲûÓùý£¬ºÇºÇ£©£¬¶à¿÷¿´ÁËÏÂÃæµÄÎÄÕ²ÅÈÃÎÒÁ˽âajaxµÄÊÊÓ÷¶Î§¡£ÆäʵֻҪ·ûºÏw3cµÄ±ê×¼¾Í¿ÉÒÔÔÚFirefoxµÈÕâЩä¯ÀÀÆ÷ÉÏÕý³£ÏÔʾ£¬ËùÒÔ»¹ÊÇÓ¦¸ÃºÃºÃÁ˽âÒ»ÏÂw3cµÄ±ê×¼¹æÔòѽ¡£²»¹ýÒª½ ......
A.aspxÒ³Ãæ·ÅÒ»¸ödropdownlist£¬ÔÚA.aspx.csÌí¼Ó£º this.drpSchool.Attributes.Add("onchange", "load(this.options[this.selectedIndex].value)");
ÔÚA.aspxÒ³ÃæÌí¼ÓÈçϽű¾£º
function load(state){
var oHttpReq = new ActiveXObject("MSXML2.XMLHTTP");
var oDoc = new ActiveXObject("MSXML2.DOMDocument");
......
ÏÈ˵ͨ¹ýjavascript·¢ËÍʱµÄÂÒÂëÎÊÌ⣬Èç¹û·¢Ë͵ÄÊÇÖÐÎÄ£¬¾ÍÒªÓÃescapeÕâ¸öº¯Êý´¦Àí£¬±ÈÈ磺
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
var url="testurl.php?name="+"¸Õ¸Õ";
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
ÄÇô¾ÍÒª¸Ä³É
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
var url="testurl. ......