Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

dhtmlxtreeÓÃAjaxˢмÓÔØXML

     ºÜ¾ÃÒÔǰ£¬ÎÒѧ»áÁËÓÃdhtmlxtree£¬ÄÇÊÇÒ»¿ÃºÜ²»´íµÄÊ÷£¬ÓÃÆðÀ´ºÜ·½±ã£¬µ«ÊÇÒ»¸öÎÊÌâһֱûÓнâ¾ö£¬´Óǰ¶¼ÊǷֺܶà´ÎÈ¥Êý¾Ý¿âÖв飬×ñÑ­µÄÔ­ÔòÊÇ£¬ÏȲé³öÉϼ¶£¬È»ºóÔÙ¸ù¾ÝÉϼ¶ID²é³öϼ¶ID£¬ÕâÑùÒ»²ãÒ»²ãµÄ²é£¬ÓÚÊǵ±Êý¾ÝÁ¿´óÁË£¬Ê÷¼ÓÔØµÄʱºò»áºÜµÄºÜÂý£¬ÓÐʱºòµÈËû¿ªÊ¼¼ÓÔØµÄʱºò£¬¿ÉÒÔ¸æË߯ÁĻǰµÄÈËÔ±£¬“Äú¿ÉÒÔÑ¡ÔñÈ¥²éºÈ±­¿§·È»òÕß³öÈ¥¹ä¹äÔÙ»ØÀ´£¬ÒòΪÐèÒªºÜ¾Ã”£¬¶ÙʱÎÞÓï¡£
    Êý¾Ý¿âÊÇÕâÑùÉè¼ÆµÄ£º
    ID    Ãû³Æ     Éϼ¶ID
    1      A        
    2      B       
    3      C        1
    4      D        1
    ……
   ʹÓÃdhtmlxtreeµÄ·½·¨(×Ô¼º²é¿´API)£º
  µÚÒ»²½£º¼ÓÔØJS,CSS,ÆäÖаüÀ¨dhtmlxcommon.js,dhtmlxtree.js,dhtmlXTreeExtend.js,dhtmlxtree.css
  µÚ¶þ²½£ºÐ´ÈëHTML£¬ÈçÏÂ
  <table width="100%" class="searchTable">
  <tr><td class="searchTdTitle">·ÖÀàÌåϵ½á¹¹</td>
  </tr>
  <tr>
    <td class="lefttree"><a href="javascript:void(0);" onclick="tree.openAllItems(0);">Õ¹¿ª</a>&nbsp;&nbsp;&nbsp;
      <a href="javascript:void(0);" onclick="tree.closeAllItems(0);">ÊÕ£</a></td>
  </tr>
  <tr>
    <td class="lefttree"><div id="treeboxbox_tree" class="dhtmlxTree" style="width:230px;"></div></td>
  </tr>
</table>
 <script>
  tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);//³õʼ»¯Ê÷
  tree.setImagePath("<%=path %>/skins/blue/common/dhtmlx/images/c


Ïà¹ØÎĵµ£º

ajaxѧϰ±Ê¼Ç1

<html>
<head>
<title></title>
</head>
<mce:script type="text/javascript"><!--
var xmlHttp = false;
try{
xmlHttp = new XMLHttpRequest();
}catch(trymicrosoft){
try{
xmlHttp = new ActiveXObject("Msxml2.XMLHT ......

AjaxÎÞË¢·ÖÒ³

jsÎļþ:
var where=" where pd_Isjifen=0 and pd_Isok=1"; //²éѯÌõ¼þ
var psize=16; //²éѯÊý¾ÝÊýÄ¿
var pindex=0;//µ±Ç°Ò³Êý
var order=" order by pd_Update desc,type_sort,pd_brand,pd_typeid"; //ÅÅÐòÌõ¼þ
var temp=0; //Ä£°åÃû³Æ
var Pcount=0;

//»ñÈ¡²ÎÊý
function getUrlPara(p ......

ajax»Øµ÷


xmlÊý¾Ý£º
writer.write("<root>" +
   "<name>a</name>" +
   "<name>b</name>"+
   "</root>");
ǰ̨½âÎö£º
request.onreadystatechange=function(){
  if(request.readyState==4){
   var x=requ ......

Ajax£ºÍ¨ÍùÐÂÊÀ½çµÄΰ´óº½µÀ

AjaxÈ«³ÆÎª“Asynchronous JavaScript and XML”£¨Òì²½JavaScriptºÍXML£©£¬ÊÇÒ»ÖÖ´´½¨½»»¥Ê½ÍøÒ³Ó¦ÓõÄÍøÒ³¿ª·¢¼¼Êõ¡£¸ù¾ÝAjaxÌá³öÕßJesse James Garrett½¨Ò飬Ëü£º
ʹÓÃXHTML+CSSÀ´±íʾÐÅÏ¢£»
ʹÓÃJavaScript²Ù×÷DOM£¨Document Object Model£©½øÐж¯Ì¬ÏÔʾ¼°½»»¥£»
ʹÓÃXMLºÍXSLT½øÐÐÊý¾Ý½»»»¼°Ïà¹Ø²Ù×÷£»
Ê ......

AJAX±íµ¥Ìá½»·½·¨£¨JSON£©

AJAX±íµ¥Ìá½»·½·¨£¨JSON£©
1./*****JAVA**************************************************************/
JAVAÀàÖУº
 
/*****JAVA**************************************************************/
2./*****struts.xml**************************************************************/
struts.xmlÎļþÖУº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ