AjaX ¶þ¼¶Áª¶¯
JSP:
¿Î³ÌÃû³Æ:
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/options.js"></script>
<html:select property="icourseId" onchange="change(this)" style="width:180px;">
<html:option value="0">----ÇëÑ¡ÔñÒÔÏ¿γÌ----</html:option>
<html:options collection="clist" labelProperty="ccourseName" property="icourseId"></html:options>
</html:select>
¿Î³ÌÕ½Ú:
<select name="ichapterId" id="result" style="width:180px;">
<option value="">----ÇëÑ¡ÔñÒÔÏÂÕ½Ú----</option>
</select>
******************************************************************************
options.js:
function change(option){
var opvalue = option.value;
//ÉèÖÃÓë·þÎñ¶Ë½øÐн»»¥µÄURL(°üÀ¨ÖÐÎÄ´¦Àí)
var url = "options.do?opvalue="+encodeURI(encodeURI(opvalue));
url = covertURL(url);
//Óë·þÎñ¶Ë½øÐн»»¥,²¢ÏÔʾÊý¾Ý
$.get(url,null,function(data){$("#result").html(data);});
}
//´¦Àí»º´æÎÊÌâ
function covertURL(url){
var timeURL = (new Date()).valueOf();
if(url.indexOf("?") >= 0){
url = url + "&t=" + timeURL;
}else{
url = url + "?t=" + timeURL;
}
return url;
}
***************************************************************************
ACTION:
public class OptionsAction extends Action {
private WebService webservice;
public void setWebservice(WebService webservice) {
this.webservice = webservice;
}
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response
Ïà¹ØÎĵµ£º
ÔÚ.netµÄÑéÖ¤¿Ø¼þÖÐÓÐÒ»¸öCustomValidatorÑéÖ¤¿Ø¼þ£¬ÆäÊôÐÔClientValidationFunctionΪ¿Í»§¶Ëº¯Êý£¬ÔÚÐèÒªÑéÖ¤µÄ¿Ø¼þʧȥ½¹µã»òÕßpostÊý¾Ýʱ£¬µ÷Óøú¯Êý¡£
ǰ̨£º
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomValidatorTest.aspx.cs" Inherits="Web.CustomValidatorTest" %>
<!DO ......
ÈçºÎÔÚ¿Í»§¶ËÖ±½Óµ÷ÓÃWebServiceÖеķ½·¨£¿
ÕâÀï½áºÏ¾Ñé×Ô¼ºÐ´Ò»Ð´
1.Ê×ÏÈн¨Ò»¸ö ASP.NET AJAX-Enabled Web Site,ÕâÑùϵͳΪÎÒÃÇ×Ô¶¯ÅäÖúÃÁË»·¾³£¬ÕâÖ÷ÒªÌåÏÖÔÚWeb.configÕâ¸öÎļþÉÏ£¬Èç¹ûÒÑÓÐÍøÕ¾²»ÊÇASP.NET AJAX-Enabled Web SiteÒ²¿ÉÒÔ¶ÔÕÕÐÞ¸ÄÏÂWeb.config£¬Ò²¿ÉÒÔ´ïµ½ÏàͬµÄЧ¹û¡£
2.н¨Ò»¸öweb·þÎñ£¬WebSer ......
asp.net ajaxѧϰ±Ê¼Ç
Ò»¡¢ µÇÌÃÈëÊÒ——»ù±¾¸ÅÄî
http://blog.csdn.net/soldierluo/archive/2009/11/18/4830758.aspx
¶þ¡¢ СÊÔÉíÊÖ——µÚÒ»¸öAjax³ÌÐò
http://bl ......
ÔÎĵØÖ·£ºhttp://sharethispoint.com/archive/2006/11/15/Build-web-parts-with-ajax.aspx
ÈçºÎÔÚ¿ª·¢Web²¿¼þʱʹÓÃajaxÄØ£¿ÎÒÃǽ«ÒÔÒ»¸öÑù×ÓÀàËÆMOSS 2007ÖÐKPIºÍBDC Web²¿¼þµÄWebPartΪÀýÀ´ËµÃ÷¡£Èç¹ûÄã¶ÔajaxÒ»µã¶¼²»Á˽â,ÍƼöѧϰTerryLeeµÄajaxÈëÃÅϵÁС£
ASP.net2.0ÓÐÒ»¸öºÜ¿áµÄÐÂÌØÐÔ½Ð×÷¿Í»§¶Ë½Å±¾»Øµ÷¡£½Å±¾»Øµ ......
×î½ü×ö¸öÈËÍøÕ¾Óöµ½AJAX¿ç×ÓÓòÃûµÄÎÊÌâ¡£
ż¶û¿´µ½baiduµÄͨÐÐÖ¤´¦Àí¶¼ÊÇÔÚ¶þ¼¶ÓòÃûpassport.baidu.comÖд¦ÀíµÄ£¬
µ«ÊÇbaiduºÜ¶àµØ·½µÇ¼¶¼ºÃÏñÊÇÓÃajax´¦ÀíµÄ£¬ËûÊÇÔõô×öµÄÄØ£¿Ñо¿ÁËһϣ¬·¢ÏÖÒ»¸öС¼¼ÇÉ¡£
²»·ÀÈôó¼ÒÒ²½è¼øһϡ£
ÔÚhttp://zhidao.baidu.com/ δµÇ¼Óû§»Ø´ðÎÊÌâʱ»áÓÃiframeµ÷ÓÃhttp://zhidao.bai ......