xtree dwr (ajax)Òì²½¼ÓÔØÃ¿¸öÊ÷½áµãµÄ´úÂë
tree.js
function getRank(rankNum)
{
var rankName="";
switch(rankNum)
{
case 1:
{
rankName="(ÆÕͨ»áÔ±)";
break;
}
case 2:
{
rankName="(Ò»¼¶»áÔ±)";
break;
}
case 3:
{
rankName="(¶þ¼¶»áÔ±)";
break;
}
case 4:
{
rankName="(Èý¼¶»áÔ±)";
break;
}
}
return rankName;
}
function getContent(arrayCol)
{
var str="";
var imgPath=rootPath+"images/";
if(arrayCol.N_IS_SERVICE=="2")
{
imgPath+="fwzx.gif";
}else
{
switch(parseInt(arrayCol.N_STATE))
{
case 0:
{
imgPath+="wkt.gif";
break;
}
case 1:
{
imgPath+="kt.gif";
break;
}
}
}
if(arrayCol.N_STATE==2)
{
imgPath+="chuju.gif";
}
return str +="<img src='"+imgPath+"'/>"+arrayCol.V_USER_ID+getRank(parseInt(arrayCol.N_RANK));
}
function addNode(obj)
{
if(obj.sFlag==undefined && obj.isSon>0)
{
obj.sFlag=1;
ajaxuser.getUserTree(obj.sId,1,function(datas){
for(var i=0;i<datas.length;i++)
{
var chdNode=datas[i];
var tmpEle = new WebFXTreeItem(getContent(chdNode),chdNode.V_USER_ID,chdNode.IS_SON)
Ïà¹ØÎĵµ£º
NO1.
ÔÚatlas(ajax)ÖÐÇ벻ҪʹÓÃResponse.Write(),
ÇëʹÓÃClientScript.RegisterClientScriptBlockÌæ»»
ʹÓÃÈçÏ£º
ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script>alert('×Ô¼º¿´×Űì!')</script>");
×¢Ò⣺RegisterStartupScript ·½·¨Êǽ« JavaScript ǶÈëµ½ ASP.NET Ò³ÃæµÄµ×²¿£ ......
½â¾öAjax´«ËÍÖÐÎĻᵼÖÂÂÒÂëµÄÎÊÌâ
//Èç¹û´«ËͲÎÊýÊÇÖ±½Ó¸³ÓèµÄ£¬¾Í»á²úÉúÂÒÂë!
http_request.open("POST",url,true);
http_request.setRequestHeader('Content-Type',
'application/x-www-form-urlencoded');
http_request.send("action="+strName+"&val="+val);
......
<html>
<head>
<title>jQuery Ajax ʵÀýÑÝʾ</title>
</head>
<script language="javascript" src="../lib/jquery.js"></script>
<script language="javascript">
$(document).ready(function ()
{
$('#send_ajax').click(function (){
&nb ......
¡¡¡¡Ê×Ïȼì²éWeb.configÎļþÀïÊÇ·ñÊÇÈçÏ´úÂ룺
¡¡¡¡´ò¿ªVS2005´´½¨ÐÂÏîÄ¿£¬Ñ¡ÔñASP.NET¡¡AJAXÏîÄ¿£¬È»ºó°Ñ¸ÃÏîÄ¿Web.configÎļþµÄÄÚÈÝÈ«²¿¸´ÖƵ½Ä㱨´íµÄWeb.configÎļþÀï¡£
¡¡¡¡Èç¹ûÕâ¸ö°ì·¨Î´Äܽâ¾ö°ì·¨Çë²é¿´¸ÃÏîÄ¿¸ùĿ¼µÄBinÎļþ¼ÐÄÚÊÇ·ñÓÐSystem.Web.Extensions.Design.dll¡¢System.Web.Extensions.dll¡¢A ......
+++++++++++++++++++++++Ajax
~~~~~~~~~~~~~~~~~~~~~~~~~~
======= Ajax ¼¼Êõ ========
Ò»¡¢µÚÒ»¿Î ===¡· AJAX¸ÅÊöÓëIntelliJ°²×°
a.Ajax¶Á·¨Æäʵ²»ÊÇÎÒÃǶÁµÄ'°¢¼Ù¿Í˹'£¬×¢Òâרҵ»¯¡£
b.ÍõÐË¿ýÀÏʦÏȽ²Êµ¼ùÔÙ½²ÀíÂÛ¡£
c.¿ª·¢¹¤¾ß²»ÔÙÊÇeclipseÁË£¬ÒòΪajaxÖ÷Ҫдjavascript
d ......