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

¹ØÓÚExt.AjaxÇëÇóPHPµÄÎÊÌâ - Web ¿ª·¢ / Ajax

дÁËÒ»¸öExtµÄAjaxʾÀý,ÆäÖе±ÎÒµÄURL¶¨Ïòµ½ServletµÄʱºò,³É¹¦,·µ»ØÕý³£½á¹û,ÓÃfirebug²é¿´"ÏìÓ¦"²¿·Ö,µÃµ½µÄÊÇÒ»¸öjson×Ö·û´®{data : '11111'}
Ò³Ãæµ÷ÓÃ:
JScript code:
var jsonString = Ext.util.JSON.decode(response.responseText);
Ext.MessageBox.alert("result : ", jsonString.data);

Servlet´úÂë:
Java code:
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
String username = request.getParameter("username");
String password = request.getParameter("password");
System.out.println(username + "\t" + password);
PrintWriter out = response.getWriter();
out.println("{data : '11111'}");
out.flush();
out.close();
}


µ«Êǵ±ÎÒµÄURL¶¨Ïòµ½phpµÄʱºò£¬³É¹¦Êdzɹ¦ÁË,µ«·µ»ØµÄ½á¹ûÊÇÕû¸öPHPÎļþµÄ´úÂë,È»ºóalert³öÀ´ÊÇ¿ÕÖµ,firebugÀïµÄ"ÏìÓ¦²¿·ÖÊÇÕû¸öPHPÎļþµÄ´úÂë,²»ÊÇjson×Ö·û´®",ÒªÔõô×ö²ÅÄÜÄõ½"data"Õâ¸öÖµ?

php´úÂë:
PHP code



Code highlighting produced by Actipro CodeHighlighter


Ïà¹ØÎÊ´ð£º

struts2ʹÓÃajaxµÄÎÊÌâ~~~ - Java / Java EE

ÎÒÏÖÔÚÓÃstruts2¿ò¼Ü,ÐèҪʹÓÃajaxʵÏÖ¾Ö²¿Ë¢Ð£¬µ«ÊÇ´ÓÈÝÆ÷Àï·µ»ØµÄÖµ²»ÖªµÀÔõô´Óstruts.xmlÅäÖÃÎļþÀïÓ³Éäµ½jspÒ³ÃæÀÒÔÇ°servletÀïдout.orint("xxxxx")¾Í¿ÉÒԵõ½~£¬µ«ÊÇÏÖÔÚÓÃstruts¾Í²»ÖªµÀÔõôР......

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

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

¸ß·Âgoogle suggest ajaxʾÀý - Web ¿ª·¢ / Ajax

ÕÒÁËÒ»¸ö,µ«ËÑË÷ºó²»Ìáʾ,ºÃÏñÎÊÌâ,²é²»³öÀ´Ô­Òò,Ë­°ï×Å¿´Ò»ÏÂ
http://www.chinaz.com/Program/Asp/020Q062632010.html


End_rbody_64769658//-->
¸Ã»Ø¸´ÓÚ2010-04-19 08:15:36±»°æÖ÷ɾ³ý


¶ÔÎÒÓÐ ......

AJAX ºǫ́Ôõôȡ²»µ½Ö± - .NET¼¼Êõ / ASP.NET

´úÂëÈçÏ Çë¸ßÊÖ Ö¸µãÏ лл
ajax_http.js
-------------
function getXMLHTTP() {
  var xmlhttp;
  if (window.ActiveXObject) {
  //IE
  try {
  ......

php ¹ØÓÚsession_startµÄÎÊÌâ - PHP / »ù´¡±à³Ì

Çë½Ì¸ßÊÖ°ï棬session_start£¨£©·ÅÔÚÍⲿµÄÎļþÓà require »ò include °üº¬½øÀ´£¬ÇëÎÊÕâÑù×öºÏÀíÂ𣿣¿´úÂëÔËÐÐÊÇÕý³£µÄ£¬ÕâÑù×öºÏÀíÂ𣿣¿Çë¸ßÊÖÖ¸µã¡£¡£¡£¡£ лл····
require »ò include ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ