ÈçºÎ¼¯³ÉajaxÓëstructµÄÓŵã
ajax£¬²»ÓÃˢУ¬ÎÒºÜϲ»¶£¬ÎÒÏÖÔÚÐ´Ò³ÃæÊ±£¬Ö»Òª²»ÊÇתҳ£¬ÎÒ¶¼Ê¹ÓÃajax£¬¿ÉÊÇÕâÑùÓëstruct£¬ÓгåÍ»¡£
ÕâÑùµÄ»°£¬structµÄactionÓëformbeanÀà¶¼Óò»×ÅÁË£¿
ÎÊÌâ1£º
µ±Ìá½»ºÜ¶àÊý¾Ýʱ£¬±È·½ËµÓÐÓû§Ãû¡¢µç»°¡¢ÁªÏµÈË¡¢×ÊÁÏ¡¢Ç©Ãû¡£¡£¡£ÎÒʹÓÃajaxʱ£¬Ö»ÄÜÒ»¸öÒ»¸ö×ֶεĴ«£¬²»ÄÜ·â×°³É¶ÔÏóÁË¡£¡£¡£ ÕâÑùµÄÎÊÌâÊÇ×ֶκܶàµÄ»°£¬¾ÍºÜ·Ñ¾¢£¨¶øÕâÊÇstructµÄÓÅÊÆ£©
ÎÊÌâ2£º
ÎÒдµÄjava·½·¨£¨±È·½ÐÞ¸ÄijЩ¶«Î÷£©£¬ÐèÒªsession£¬ ʹÓÃstructʱ¿ÉÒÔ´Óexecute·½·¨ÀïµÃµ½session£¬¿ÉÊÇÎÒʹÓÃ×Ô¼ºÐ´µÄ·½·¨£¬²»ÄÜ´øsessionѽ£¨¹Ø¼üÊÇ£ºÒªÊÇ´ø£¬ÎÒÔõô´«?£©,¿ÉÊÇÎÒ±ØÐëÓÃ(µ±È»£¬¿ÉÒÔд¸öÒþ²ØÓò£¬¿ÉÊÇÎÒ×ܸоõÄÇÑù²»°²È«)¡£ÎÒÏëÖªµÀµÄÊÇÈç¹û×Ô¼ºÐ´µÄ·½·¨£¬ÎÒÒªjavascriptÀïÔõô´«session£¨ºÜÔΣ¬¿ÉÄÜÍêÈ«´íÁË£©
Ïò´ó¼ÒÇó½â¡£Ð»Ð»¡£
´ó¼Ò˵ÏÂÄãÃǵÄ×ö·¨°É¡£
ûÓöµ½¹ýÕâÑùµÄÎÊÌ⣬ajaxÖ»ÊÇÓùý£¬²»¹ýÓõIJ»¶à¡£Ö»ÄܰﶥÁË
ajaxÊǺ㬵«ÊDz»ÒªÀÄÓá£
ÄãÒªÍù Ìá¸ßÓû§ÌåÑéµÄÇé¿ö¿¼ÂÇÏÂÈ¥Óá£
²»ÒªÒòΪajax¶øajax¡£
Äã¿´¿´ÄÇЩ´óÍøÕ¾¡£±íµ¥µÄÌá½»»¹ÊÇÓõĴ«Í³µÄform¡£
ÄѵÀËûÃDz»»áajax£¿
Èκμ¼Êõ¶¼ÓÐÓÅȱµã
ÒªÔÚºÏÊʵĵط½ÓúÏÊʵļ¼Êõ
Ïà¹ØÎÊ´ð£º
ÎÒµÄÒ³ÃæÀïÓõÄAJAX¿Ø¼þ µ«Ò³Ãæ¾²Ö¹Ò»¶Îʱ¼ä¾Í»á³öÏÖÉÏÃæµÄÒ»¸ö´íÎóÊÇÔõô»áÊÂѽ Ôõô½â¾ö°¡
¸ßÊÖ°ï°ïæ°¡
½«ÏîÄ¿Éϼ¶Ä¿Â¼ÖеÄÖÐÎÄÃû³ÆÈ«²¿¸Ä³ÉÓ¢ÎÄ
Â¥ÉÏ˵µÄºÜÇå³þÁË¡£°ï¶¥Ò»Ï°É
Õâ¸öÎÊÌâ²»ÊǺܳ£ ......
function Fun1(para1,para2)
{
Fun2(para1);
....
ÒªÇóÊÇ:Ôڵõ½ajax·½·¨µÄ·µ»ØÖµºó£¬
ÔÙʹÓÃpara2(para2ÊÇÒ»¸öjavascript±äÁ¿)
ÎÊÌâ¾ÍÊÇ£¬
&nb ......
UpdatePanel ÖÐÓÐUltraWebGrid Button
ÔÚµã»÷Buttonʱ,Ê×ÏÈ×öһЩÅжÏ(Ìõ¼þA)
Âú×ãÌõ¼þAʱ,µ¯³ö¶Ô»°¿òÌáʾÓû§,Ñ¡ÊǼÌÐø Ñ¡ ·ñ ÖÕÖ¹.
Óиö´ó¸ç¸øÁËÏÂÃæ·½·¨µ¯³öÌáʾ¿ò:
st ......
¿Í»§¶ËHTMLPage.htmÒ³Ãæ
HTML code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html x ......
ÏÐÀ´ÎÞÊ£¬²âÁËÏÂXMLHttpRequest¶ÔÏ󣬽á¹ûÈ´²»ÊÇËùÏëµÄÄÇÑù£¿£¿£¿£¿£¿
JScript code:
var xhr=false;
if(window.XMLHttpRequest) {
xhr=new XMLHttpRequest();
alert("XMLH ......