AjaxµÄjs·â×°
function send_request(callback, urladdress, isReturnData){
var xmlhttp = getXMLHttpRequest();
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4) {//readystate Ϊ4¼´Êý¾Ý´«Êä½áÊø
try{
if(xmlhttp.status == 200){
if(isReturnData && isReturnData==true){
callback(xmlhttp.responseText);
}
}else{
callback("±§Ç¸£¬Ã»ÕÒµ½´ËÒ³Ãæ:"+ urladdress +"");
}
} catch(e){
callback("±§Ç¸£¬·¢ËÍÇëÇóʧ°Ü£¬ÇëÖØÊÔ " + e);
}
Ïà¹ØÎĵµ£º
ÔÚÕâ¸ö±»Ajax¼¼ÊõͳÖεĻ¥ÁªÍøÊ±´ú£¬ºÜ¶àAjax³ÌÐò¶¼»áÔÚÒì²½¶ÁÈ¡Êý¾ÝµÄͬʱ£¬ÏÔʾһ¸öÕýÔÚ¶ÁÈ¡»òLoadingµÄ¶¯»£¬½ñÌì±òGoÒªÏò´ó¼Ò
ÍÆ¼öÒ»¸öÔÚÏßÉú³ÉLoadingÔ¤ÔØ¶¯»GifͼƬµÄÍøÕ¾£¬Ëü²»µ«ÌṩÁ˳¬¶àµÄLoading¶¯»Ñùʽ¹©ÄãÑ¡Ôñ£¬¶øÇÒÄ㻹¿ÉÒÔ×Ô¶¨Òå³ß´ç¡¢ÑÕÉ«µÈ²ÎÊý£¬¿É
ν·½±ãµ½¼Ò£¬×î×îÖØÒªµÄÊÇ£¬PreLoaders.net
Ìṩ ......
ajaxÖÐʹÓÃpost ·½Ê½Ìá½»±íµ¥Ê±ÄÜÌá½»¶à´ï2GBµÄÄÚÈÝ,¶øGET·½·¨Ö»ÄÜÌá½»×î¶à512KBµÄÄÚÈÝ.ÒÔÏÂÊÇajax POSTÌá½»µÄÀý×Ó.
<!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& ......
ÎÊÌâ
ÔÚÏÖÓÐÖ÷Õ¾ÖÐʹÓõÄÊÇÊÇGBK±àÂëµÄ£¬µ±±íµ¥Ê¹ÓÃform submit·½Ê½µÝ½»µÄ»°Ã»ÓÐÎÊÌ⣬·þÎñÆ÷¶ËÄܹ»Õýȷʶ±ð×Ö·û±àÂë¡£µ«ÊÇ£¬µ±¿Í»§¶ËʹÓÃajaxµÄ·½Ê½µÝ½»±íµ¥µÄ»°£¬·þÎñÆ÷¶Ëʶ±ð¿Í»§¶ËµÝ½»µÄ±íµ¥µÄÄÚÈÝ£¬µ±ÄÚÈÝÖÐÓÐÖÐÎÄ×Ö·ûµÄ»°¾Í»á³öÏÖÂÒÂëÏÖÏó¡£
ÔÒò·ÖÎö
¾¿ÆäÔÒò£¬ÆäʵºÜ¼òµ¥£¬Ê¹ÓÃajax·½Ê½Ìá½»µÄ±íµ¥ÊÇÓÃutf-8± ......
ÏîÄ¿ÖÐÏëÓÃajax£¬ÓÚÊÇÔÚÍøÉϰÇÁËn¶à×ÊÁÏ£¬·¸ÁËn¶à´íÎ󣬴ӽñÌìÉϰൽÏÖÔÚÒ»Ö±ÔÚ´¦ÀíÕâ¸öÎÊÌ⣬ÖÕÓÚ»¹ÊǰÑËü½â¾öÁË¡£
µ±ÎÒ¿´µ½Ò³ÃæµÄajaxÏÔʾºó£¬ÎÒÐË·ÜÒì³££¬ÎªÁ˼Ǽ×Ô¼ºÑ§Ï°µÄajaxÀú³Ì£¬Ò²ÎªÁËÈøü¶àµÄÈËÉÙ×ßÍä·£¬ÌØÐ´´ËÒ»ÎÄÒÔ¼ÇÖ®£¡
·Ï»°²»ËµÁË£¬ÎªÁ˸üºÃµÄÀí½â£¬ÎÒÖØ×öÁËÒ»¸öСµÄÏîÄ¿£¬ÒÔ¼ÓÉîÓ¡Ïó ......
function eidtPageCheckIsOrder ( serverid ){
var telephonenum = document.formx.TELPHONENUM.value;
var webWapFlag=document.formx.WEBORWAPFLAG.value;
var param=setPisaQueryString('TELPHONENUM',telephonenum,'WEBORWAPFLAG',webWapFlag,'serverid',serverid,'destFold ......