jquery ajax ÖÐÎÄÂÒÂë
½áÂÛ£º
jquery 1.3.2 ajax¶Ô±àÂëÎÊÌâ½øÐйý²¿·Ö(¼ûºóÃæ²¹³ä1 )´¦Àí£¬½â¾ö·½°¸ÒÔjspΪÀý×Ó£º
ajaxÌá½»Êý¾Ý¸øjsp£ºajaxËùÔÚÒ³ÃæÎÞÈκÎÒªÇó£¬jspÒ³ÃæÐè×÷Á½·½Ãæ´¦Àí¡£
1.<%@page contentType="application/json" pageEncoding="UTF-8"%>»ò<%@page contentType="application/json" pageEncoding="gb2312"%>
2.´¦Àírequest.setCharacterEncoding("UTF-8")
Ïêϸ˵Ã÷£º
Ö®ËùÒÔ»áÂÒÂ룬ÔÒòºÜ¼òµ¥£¬Á½¸öÈ˶Ի°µÄʱºò£¬a˵ÖÐÎÄ£¬bÓÃÓ¢ÎĽÓÊÜ£¬ÓÚÊǺõÂÒÂëÒÓ£¡ ËùÒÔµ±³öÏÖÂÒÂë¸ãÇå³þËÊÇaËÊÇbºÜÖØÒª£¬È»ºóa˵»°µÄʱºòÈÃbÖªµÀÓ¦¸ÃÓÃʲôÓïÑÔ½ÓÊÕ£¬»òÕßbÒԹ̶¨µÄ·½Ê½½ÓÊÕ£¬aÓÃb½ÓÊÕµÄÓïÑÔȥ˵£¬ÕâÑù¾ÍÍòÊÂokÁË¡£ ËùÒÔÏÂÃæ·Ö³ÉÁ½²¿·ÖÈ¥·ÖÎö¡£Ò»¸öÊÇajaxµ¥´¿»ñÈ¡ÍøÒ³ÐÅÏ¢µÄÇé¿ö£¬Ò»¸öÊÇajaxµ¥´¿ÍùjspµÈÌá½»Êý¾ÝµÄÇé¿ö£¬Ï¸µÄÀ´Ëµ£¬ÕâÀïÖÖÇé¿öÓзÖÁ½ÖÖÇé¿ö¼´postºÍget
ajaxµ¥´¿×¥È¡ÍøÒ³
a£ºÇëÇóµÄÒ³Ã棬b£ºjquery ajax
ÕâÀïΪʲôaÊÇÇëÇóµÄÒ³Ã棬¶øbÊÇjquery ajaxÄØ£¿ËäÈ»ÊÇajaxÏòÒ³ÃæÒª¶«Î÷£¬ µ«ÊÇÒ²¿ÉÒÔÀí½âΪa(Ò³Ãæ)Òª¸æËßajaxµÄÄÚÈÝÊÇʲô£¬ÓÚÊǺõa˵£¬ÎÒ¸æËßÄãb(jquery ajax)£¬ÎÒµÄÄÚÈÝÊÇ......²¢ÇÒÄÚÈݵÄÓïÑÔÊÇgb2312µÄ£¬ÄãÀ´½ÓÊÜ°É¡£ ÓÚÊÇb¾Í¸ù¾ÝËûµÄ±àÂë¸ñʽ½ÓÊÕÁËaµÄÄÚÈÝ£¬ÓÚÊǾÍûÂÒÂëÁË¡£¿´Ò»ÏÂÏÂÃæµÄ±í¸ñ
µ±Ç°Ò³Ãæ±àÂëjsÇëÇóÒ³Ãæ±àÂëÖÐÎÄÂÒÂë½â¾ö·½°²/˵Ã÷
gb2312
jquery ajax »ñÈ¡Êý¾Ý
gb2312
ÊÇ
jsp:<%@page contentType="application/json" pageEncoding="gb2312"%>ÕâÀïÓõÄjson×÷²âÊÔ£¬Óëtext/htmlÓ¦¸ÃÒ»Ñù
aps:Response.Charset="gb2312"(²ÎÕÕÍøÂçδ²âÊÔ)
php:header("Content-Type:text/html; charset=gb2312");(²ÎÕÕÍøÂçδ²âÊÔ)
html:δ½â¾ö
gb2312
jquery ajax »ñÈ¡Êý¾Ý
utf-8
·ñ
utf-8
jquery ajax »ñÈ¡Êý¾Ý
utf-8
·ñ
utf-8
jquery ajax »ñÈ¡Êý¾Ý
gb2312
ÊÇ
jsp:<%@page contentType="application/json" pageEncoding="gb2312"%>ÕâÀïÓõÄjson×÷²âÊÔ£¬Óëtext/htmlÓ¦¸ÃÒ»Ñù
aps:Response.Charset="gb2312"(²ÎÕÕÍøÂçδ²âÊÔ)
php:header("Content-Type:text/html; charset=gb2312");(²ÎÕÕÍøÂçδ²âÊÔ)
html:δ½â¾ö
Ê×ÏÈ˵Ã÷£¬ÉÏÃæ˵µÄÒ³Ãæ±àÂ룬ÊÇÖ¸Îļþ×Ö·û±àÂ룬¶ø²»ÊÇhtmlÀïÃæ<meta>±êÇ©ÄÚµÄcharset=gb2312¡£¸ù¾ÝÒÔÉÏÊý¾ÝÏÔʾ£ºajaxץȥÍøÒ³µÄʱºò£¬ÂÒÂëÎÊÌâÓ뵱ǰҳÃ棨ajaxËùÔÚÒ³Ã棩Î޹ء£
¶
Ïà¹ØÎĵµ£º
¡¡¡¡µ½´ËΪֹ£¬Äã¿ÉÄÜÒѾעÒâµ½£¬Ê¹ÓÃAjax±à³ÌʱÓкܶàÂ鷳ʡ£Èç¹ûÄãÒªÖ§³Ö¶à¸öä¯ÀÀÆ÷£¨ÏÖÔÚ»¹ÓÐËÖ»Ö§³ÖÒ»¸öä¯ÀÀÆ÷ÄØ£¿£©£¬ÎÞÒÉ»áÔâÓö²»¼æÈÝÎÊÌâ¡£µ¥¿´Ò»¸ö¼òµ¥µÄ¶¯×÷£¬±ÈÈç˵´´½¨XMLHttpRequest¶ÔÏóµÄÒ»¸öʵÀý£¬ÕâÐèÒªÏȽøÐÐä¯ÀÀÆ÷²âÊÔ¡£Ò»µ©¿ªÊ¼³¢ÊÔʹÓÃAjax¼¼Êõ£¬ÄãºÜ¿ì¾Í»á×¢Òâµ½Òª·´¸´µØÍê³ÉͬÑùµÄһЩÈÎÎñ¡£µ±È»£¬ ......
ÎļþÃû£ºajax.js
/**
* È¡µÃµ±Ç°Ò³ÃæµÄurl
* ¿ÉÒÔÔÚµ÷ÓÃajax_queryÇ°ÐÞ¸Ä
**/
var url = location.href.substr(0, location.href.length-location.search.length);
/**
* ¸øFunction¶ÔÏóÌí¼ÓÒ»¸öÈ¡µÃº¯ÊýÃûµÄ·½·¨
**/
Function.prototype.Name = function() {
var s = Func ......
´Ë·½·¨ÓÃjspÄÚÖöÔÏóoutÊä³öµ½xmlÎļþÖÐ
public void ajaxEditorList() throws IOException{
HttpServletResponse response = ServletActionContext.getResponse();
//System.out.println("ddddddddddddddddddddddd;;;");
int unitid=Integer.parseInt(request.getParameter("unit ......
Google Search API
²Î¿¼Êé¼®£ºGoogle API´óÈ«—±à³Ì?¿ª·¢?ʵÀý
Êé¼®¶Ô¼¸Ê®ÖÖGoogle³£ÓÃAPI½øÐÐÁËÊáÀíºÍ½éÉÜ£¬¸¨ÒÔÐÐÖ®ÓÐЧµÄ´úÂëʵÀý
http://code.google.com/intl/zh-CN/apis/ajaxsearch/documentation/
1£©Google Site Search
GoogleÕ¾µãÄÚǶËÑË÷µÄʹÓ÷½·¨
<%@ page language="java" contentType="text/ht ......