Ajax ÔõôÈëÃÅÏêϸ½éÉÜÏ - Web ¿ª·¢ / Ajax
ÎÒ»áдһµãJavaScript¡£´ó¶àÊý¶¼ÄÜ¿´¶®¡£ÏëѧϰAjax¼¼Êõ£¬ÔõôÈëÃÅ°¡£¬ÎÒÓÃÊÇC#ÓïÑԵġ£×îºÃÄÜÏêϸµã
CSS code:
½¨ÒéȥѧjQuery£¬¼òµ¥¡¢Ò×ѧ¡¢Ò×Óá¢ÐÔÄÜÒ²ºÃ
²»Ñ§JQuery²»ÄÜѧAjaxÂð£¿
Á˽âÒ»ÏÂwebService,XML ,XmlHttpRequest¶ÔÏóµÄ¼¸¸ö·½·¨ºÍ¼¸¸öÊôÐÔ
ajax¾ÍÊÇ javascript´úÂë
»á javascriptµÄ»° ajax°ëÌì¾Í»áÁË
Èç¹û²»»á ¾ÍÓà jquery ÓÃÆðÀ´·Ç³£²»´í
Âò±¾Êé¿´¿´¡£¡£¡£Ò²²»ÊÇʲô¸ßÉîµÄ¼¼Êõ
Ŷ ÎÒ»¹ÏëµÄºÜÄÑÄØ
ÄãÖ÷Òª°ÑxmlHttpRequestÕâ¸ö×é¼þѧ»áÔõôÓá£ÄÇAJAXÒ²¾Íѧ»áÁË¡£
àŠлÁË ÓÐûÓÐÕâ·½ÃæµÄ×ÊÁϽ»Á÷ÏÂ
Ïà¹ØÎÊ´ð£º
°´Å¥·ÅÔÚUpdatePanel1£¬Ïëͨ¹ýµã»÷µ÷ÓÃDictionaryTvAdd.aspxµ¯³öÒ»¸ö×Ó´°Ìå
ÓÃÏÂÃæµÄÓï¾äÌáʾÎÒȱÉÙ¶ÔÏó
protected void Button1_Click(object sender, EventArgs e)
{
ScriptManager.R ......
ÔÚ±¾µØ²âÊÔʱ¿ÉÒԵġ£
ÉÏ´«µ½·þÎñÆ÷¾Í³öÏÖûÓÐȨÏÞÎÊÌâ¡£
ÍøÉÏËÑË÷˵²»Äܹ»¿çÓò£¬µ«ÊÇÎÒûÓпçÓò°¡£¡
¶¼ÊÇÔÚ·þÎñÆ÷ÉÏÃæÔõô»áÓпçÓòÄØ£¿
¸ÃÔõô½â¾ö£¿£¿£¿£¿£¿£¿
´úÂëÌù³öÀ´¡£¡£
function Ajax(url,parm,fu ......
Êý¾Ý¿âÒѾ·ÅÁ˶àÌõ¼Ç¼£¬¼ì²âµÄ¶¼ÊÇÓ¢Îĵģ¬¿ÉÊÇÓÐЩÓû§Ãû¿ÉÒÔÕý³£¼ì²â³öÒѱ»×¢²áÁË£¬ÓÐЩÓû§ÃûÊý¾Ý¿âÖÐȷʵ´æÔڵĵ«¾ÍÊǼì²â²»³öÒÑ´æÔÚ£¨ÔÚ×¢²áÒ³Ã滹ÊÇÏÔʾδ±»×¢²á£©£¬±ÈÈçÊý¾Ý¿âÖÐÓÐ Ò»¸öÓû§ÃûΪ£ºlb Î񱒵 ......
´úÂëÈçÏ Çë¸ßÊÖ Ö¸µãÏ лл
ajax_http.js
-------------
function getXMLHTTP() {
var xmlhttp;
if (window.ActiveXObject) {
//IE
try {
......
ÓÃAjaxÌá½»±íµ¥Êý¾Ý½øÐÐÑéÖ¤ µÚÒ»´Îºǫ́¿ÉÒÔ»ñÈ¡µ½ ÑéÖ¤ÍêÁËÐ޸ĺóÔÚÌá½»£¬ºǫ́¾ÍµÃ²»µ½Êý¾ÝÁË ÎªÊ²Ã´
JScript code:
var succ='false';
jQuery("#adDtailForm").ajaxSubmit({
url ......