AJAX±íµ¥Ìá½»·½·¨£¨JSON£©
AJAX±íµ¥Ìá½»·½·¨£¨JSON£©
1./*****JAVA**************************************************************/
JAVAÀàÖУº
/*****JAVA**************************************************************/
2./*****struts.xml**************************************************************/
struts.xmlÎļþÖУº
<action name="moveMailBox" class="mailBodyAction" method="moveMailBox">
<result type="json">
<param name="root">ajaxReturnMessage</param>
</result>
</action>
/*****struts.xml**************************************************************/
var param = "workNos="+workNos+"&radio1="+radio1+"&question1="+question1+"&radio2="+radio2+"&question2="+question2+"&radio3="+radio3+"&question3="+question3;
//ÒÔÏÂÊÇÒ»post·½·¨Ìá½»
Ext.Ajax.request({
url: "${webPath}/ycob/create/createServTask.action",
methods:'post',
form: myForm,
params : param ,
success: function(result, request) {
var ajaxResult=eval("("+result.responseText+")");
&nbs
Ïà¹ØÎĵµ£º
»ùÓÚJQuery¿ò¼ÜµÄAJAX
Ç°¼¸Ìì·¢Á˸öÌù£¬·ÖÏíÁËprototype¿ò¼Ü¹ØÓÚAJAX·½ÃæµÄѧϰ¹ý³Ì¡£È»ºóÓÐÈË˵jquery¿ò¼Ü¸ü·½±ã¡£
ÕýºÃÏîÄ¿ÖÐ×¼±¸Ê¹ÓÃthickbox£¬ÓÚÊǸɴàÅ×Æúprototype.js£¬¿´Æðjquery.jsÁË¡£JQueryȷʵ²»´í£¬Ìå»ý±È PrototypeСÁËÐí¶à£¬¶øÇÒʹÓÃÆðÀ´¸ü·½±ã¸üÁé»î¡£ÓÐÈË˵PrototypeÏñJAVA£¬Õýͳ£»¶øJQueryÏñRuby£¬Áé»î£ ......
0**£ºÎ´±»Ê¼»¯
1**£ºÇëÇóÊÕµ½£¬¼ÌÐø´¦Àí
2**£º²Ù×÷³É¹¦ÊÕµ½£¬·ÖÎö¡¢½ÓÊÜ
3**£ºÍê³É´ËÇëÇó±ØÐë½øÒ»²½´¦Àí
4**£ºÇëÇó°üº¬Ò»¸ö´íÎóÓï·¨»ò²»ÄÜÍê³É
5**£º·þÎñÆ÷Ö´ÐÐÒ»¸öÍêÈ«ÓÐЧÇëÇóʧ°Ü
100——¿Í»§±ØÐë¼ÌÐø·¢³öÇëÇó
101——¿Í»§ÒªÇó·þÎñÆ÷¸ù¾ÝÇëÇóת»»HTTPÐÒé°æ±¾
200——½»Ò ......
<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 ......
<script type="text/javascript" src="jquery-1.3.2.min.js" mce_src="js/jquery.js"></script>
<input name="writer" id="writer" type="text" value="" />
<input name="pass" id="pass" type="password" value="" /> ......
AjaxÈ«³ÆΪ“Asynchronous JavaScript and XML”£¨Òì²½JavaScriptºÍXML£©£¬ÊÇÒ»ÖÖ´´½¨½»»¥Ê½ÍøÒ³Ó¦ÓõÄÍøÒ³¿ª·¢¼¼Êõ¡£¸ù¾ÝAjaxÌá³öÕßJesse James Garrett½¨Ò飬Ëü£º
ʹÓÃXHTML+CSSÀ´±íʾÐÅÏ¢£»
ʹÓÃJavaScript²Ù×÷DOM£¨Document Object Model£©½øÐж¯Ì¬ÏÔʾ¼°½»»¥£»
ʹÓÃXMLºÍXSLT½øÐÐÊý¾Ý½»»»¼°Ïà¹Ø²Ù×÷£»
Ê ......