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
Ïà¹ØÎĵµ£º
function ajaxFunction()
{
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
......
ÔÚweb.configÖÐÐÞ¸ÄÐÞ¸ÄÊôÐÔ
1£º<configSections><configSections>ÖмÓÏÂÃæ´úÂë
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ajaxµ¯³öʾÀý-¿É¿ ......
jqueryÖÐÒѾ·â×°ÁËajaxµÄ¹ý³Ì£¬Ê¹ÓÃÆðÀ´ºÜ¼òµ¥£º
ͨ¹ýget·½Ê½Ìá½»£º
<html>
<head>
<title>ʵÏÖ·þÎñÆ÷ʱ¼äʵʱ±ä»¯</title>
<script language="javascript" type="text/javascript" src="js/jquery-1.3.1.js"></script>
& ......
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<input type="button" onclick="test();" value="Ìá½»"/>
<script type="text/javascript">
function test(){
var valid = {
& ......