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

jQuery Ajax Ôõô»ñÈ¡ÁíÒ»Ò³ Response.WriteÊý¾Ý£¿

C# code:
<script type="text/javascript">


function get(aid){
$.ajax({
url:"t2.aspx?id="+aid+" & time="+new Date().toString(),
type:'GET',
success:function(){
$('#new').html(arguments[0]);////???ÕâÀïÔõô½ÓÊÕ£¬²»ÖªµÀÎÒд´íûÓУ¿
}
});
}

</script>


</head>
<body>
<form id="form1" runat="server">


<div class="new" id="new"> </div>

<script language="javascript" type="text/javascript">
getDigg(197);
</script>



C# code:
protected void Page_Load(object sender, EventArgs e)
{
string s = Session["aid"].ToString();
int aid = int.Parse(s);
if (aid == 197)
{
Response.Write("<div class=\"act\">ok</div>");
}
Response.End();

}

ÊǶԣ¬jqĬÈϽûÓûº´æ£¬Òò´Ë²»ÓÃÄãÀ´¼Óʱ¼ä

²»ÊÇÓÃSession»ñÈ¡°É  url´«ÖµÅ¶

1 º¯ÊýÃû³ÆÊÇgetDigg²»ÊÇget°É, ÆäËû²âÊÔÏÂÀ´¿ÉÒÔµÄ
2 ·þÎñÆ÷¶Ë´úÂëÀï ΪºÎÈ¡Session? Ó¦¸ÃÊÇRequest°É

HT


Ïà¹ØÎÊ´ð£º

jqueryÖÐÏòajaxÎÊÌâ - Web ¿ª·¢ / JavaScript

ÎÒÔÚÒ»¸öhtmlÖÐдÈçÏ´úÂ룺
JScript code:
<html>
<head>
<script type="text/javascript" charset="utf-8"
src="script/jquery-1.3.2.min ......

ajax¶ÁÈ¡ashxÊä³öµÄjsonÊý¾Ý±¨´í - .NET¼¼Êõ / C#

ÎÒÓÃjqueryÎÞË¢ÐÂÉÏ´«Í¼Æ¬ºó·µ»Øjson¸ñʽµÄÊý¾Ý±¨´í
£¨Êµ¼ÊÉÏͼƬÊÇÉÏ´«³É¹¦µÄÁË£¬Ö»ÊÇ·µ»Øjson¸ñʽ×ܶÁ²»µ½£¬×ÜÊDZ¨´í£©
ÎÒµ÷ÊÔÉÏ´«µÄashxÒ³ÈçÏÂ
ÎÞ·¨ÏÔʾ XML Ò³¡£ 
ʹÓà Ñùʽ±íÎÞ·¨²é¿´ XML ÊäÈë¡£Çë¸ü ......

[¼±Óð¡] JSP+AJAX ÌøתÎÊÌâ. - Web ¿ª·¢ / Ajax

ÎÊÌâ: ÏÖÔÚÌá½»Ö®ºó¾Í²»ÄÜÌøµ½ajax.jsÖÐÖ¸¶¨µÄservlet 
  ¶øÊÇÓÖÖØнøÈëµ½ÁËpub_hotel_t.jspÒ³Ãæ. Ò²¾ÍÊÇûÓÐÖ´Ðе½ajaxÀïÃæÈ¥ ´ó¼Ò°ïæ¿´¿´ÊÇʲôԭÒò°É.
  ÊDz»ÊǺÍÌá½»µÄ°´Å¦ÓйØÄ ......

ajax ÖÐÎÄÂÒÂë - Java / Web ¿ª·¢

ÔÚservletÖУ¬ÓÐÖÐÎÄ´«µÝµ½Ò³ÃæÖеÄjsÀïÃ棬ÔÚjsÏÔʾÖÐÎÄʱ£¬³öÏÖÂÒÂë¡£
serletÀïÃ沿·Ö´úÂ룺
Java code:

StringBuffer sb=new StringBuffer("<nprovince>");
for(City city:clist){
......

¼±¼±£¡£¡ajax ÖÐÎÄÂÒÂë - Java / Web ¿ª·¢

ÔÚservletÖУ¬ÓÐÖÐÎÄ´«µÝµ½Ò³ÃæÖеÄjsÀïÃ棬ÔÚjsÏÔʾÖÐÎÄʱ£¬³öÏÖÂÒÂë¡£
serletÀïÃ沿·Ö´úÂ룺
Java code:

StringBuffer sb=new StringBuffer("<nprovince>");
for(City city:clist){
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ