Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

×¢²áÓû§ÃûÑéÖ¤(ajax°æ)

<!--×¢²áÑéÖ¤Óû§ÃûÊÇ·ñ´æÔÚ(²»Ë¢ÐÂ)(2008-07-10 11:22:08)±êÇ©£ºdocument if color ch rs ×¢²á ajax ÑéÖ¤ Óû§Ãû it   ·ÖÀࣺÍøÂç±à³ÌÓ¦ÓÃ
Õë¶ÔASPµÄ ÓõÄÊÇAJAXдµÄ
·ÖÁ½²¿·Ö
 
-->
1.×¢²áÒ³Ãæ
JS²¿·Ö:
<script language="JavaScript">
function chuser(){
  var csuser=document.getElementById("csuser").value;
   if((csuser == null) || (csuser == ""))
 {
   document.getElementById("loginid_info").className = 'STYLE1';
   document.getElementById("loginid_info").innerHTML = 'Óû§Ãû²»ÄÜΪ¿Õ¡£';
  return false;
 }
  else
    if(csuser.length<6 || csuser.length>16)
   {
    document.getElementById("loginid_info").className = 'STYLE1';
    document.getElementById("loginid_info").innerHTML = 'Óû§Ãû±ØÐëΪ6-16λ¡£';
    return false;
   }
   //var filter=/^\s*[.A-Za-z0-9_-]{2,16}\s*$/;
   //if (!filter.test(username.value)) {
    //document.getElementById("loginid_info").background='#BFDFFF'
    //document.getElementById("loginid_info").innerHTML = 'Óû§Ãû±ØÐëÓÉÊý×Ö,Ó¢ÎÄ»òÏ»®Ïß×é³É¡£'
    //return false;
   //{
   //document.getElementById("loginid_info").innerHTML = '<font color=#red>Óû§Ãû±ØÐëÓÉÊý×Ö,Ó¢ÎÄ»òÏ»®Ïß×é³É¡£</font>'
   // return false;
   //}
    else{
    GetResult(csuser)
    document.getElementById("loginid_info").className = 'STYLE2';
    //document.getElementById("loginid_info").innerHTML = '<font color=#0066ee>ÌîдÕýÈ·¡£</font>'
   }
}
function GetResult(opr)
{
var oBao = new ActiveXObject("Microsoft.XMLHTTP");
var my_url="ch.asp?username="+ escape(opr);
oBao.open("POST",my_url,false);
oBao.send(null);
var strResult = unescape(oBao.responseText);
document.getElementByI


Ïà¹ØÎĵµ£º

¾²Ì¬Ò³Ãæonload·½·¨Ôö¼ÓAjaxºó¶Ô±äÁ¿µÄÓ°Ïì

Õ⼸ÌìÒ»Ö±ÔÚÑо¿treeTable£¨ÊÇÒ»¿îjQueryµÄ²å¼þ£©£¬Õâ¿î²å¼þ½«ÆÕͨµÄ±í£¬±ä³ÉÒ»¸ö¿ÉÒÔÊÕËõµÄtreeTable¡£ÕâÖÖ±í¸ñÖ÷ÒªÓ¦ÓÃÓÚȨÏÞ´¦Àí£¬¿ÉÒÔʹÓû§Ò»Ä¿ÁËÈ»µØ¿´¼û¸÷¸ö×ÊÔ´µÄ¼Ì³Ð¹Øϵ¡£ ÉÏͼ¾ÍÊÇÒ»¸ö¼òµ¥µÄtreeTableͼÀý¡£ µ«ÊǸñíÊÇÒ»¸ö¾²Ì¬µÄ±í£¬±í¸ñÀïµÄÄÚÈÝÊÇÒ»´ÎÐÔ´Ó·þÎñÆ÷ÉÏ»ñÈ¡ÏÂÀ´£¬È»ºó²å¼þ¸ù¾ÝtrµÄidÒÔ¼°clas ......

ʹÓÃXMLHttpRequest ʵÏÖajaxЧ¹û

Ò»¡¢XMLHttpRequest ¶ÔÏóµÄ·½·¨ÓëÊôÐÔ
·½    ·¨
Ãè    Êö
abort()
Í£Ö¹µ±Ç°ÇëÇó
getAllResponseHeaders()
°ÑHTTPÇëÇóµÄËùÓÐÏìÓ¦Êײ¿×÷Ϊ¼ü/Öµ¶Ô·µ»Ø
getResponseHeader("header")
·µ»ØÖ¸¶¨Êײ¿µÄ´®Öµ
open("method", "url")
½¨Á¢¶Ô·þÎñÆ÷µÄµ÷Óá£method²ÎÊý¿ÉÒÔÊÇGET¡¢POST»òPUT¡£ ......

ʹÓà AJAX À©Õ¹Æ÷×Ô¶¨Òå¿Ø¼þ

 
 Figure A MaskedEdit À©Õ¹Æ÷ÊôÐÔ
ÊôÐÔ
ĬÈÏÖµ
˵Ã÷
AcceptAMPM
False
Ò»¸ö²¼¶ûÊôÐÔ£¬ÓÃÓÚָʾÊÇ·ñӦʹÓà AM/PM ·ûºÅ¡£
AcceptNegative
None
ָʾÊÇ·ñÔÊÐíʹÓøººÅ (-)¡£À´×Ô MaskedEditShowSymbol ö¾ÙµÄ¿ÉÓÃÖµ°üÀ¨£ºNone¡¢Left ºÍ Right¡£
AutoComplete
True
Ò»¸ö²¼¶ûÊôÐÔ£¬ÓÃÓÚÖ¸Ê ......

AjaxÌØЧ ¶¯Ì¬¼ÓÔصÄFAQ Ö®ËÄ

·þÎñÆ÷¶ËÏìÓ¦Îļþread_faq.jsp
·þÎñÆ÷ÏìÓ¦Îļþ¸ù¾ÝÓû§´«ÈëµÄfaqId²ÎÊý£¬´ÓÊý¾Ý¿âÖвéÕÒ¶ÔÓ¦µÄFAQÏêϸÐÅÏ¢¡£ÏêϸÐÅÏ¢¿ÉÒÔΪ°üº¬HTML±ê¼ÇµÄÄÚÈÝ¡£²éѯÍê±Ïºó½«½á¹û·µ»Ø¡£
 
<%@ page contentType="text/plain; charset=UTF-8"%>
<%@ page language="java"%>
<%@ page import="java.sql.*,ajax.db.D ......

AjaxÌØЧ ¶¯Ì¬Ê÷ÐÎÁбí Ö®¶þ

¼¼ÊõÒªµã
ÔÚ»ù±¾Ô­ÀíµÄ½éÉÜÖУ¬Á˽⵽ͨ¹ýÔÚ¸¸½ÚµãÄÚ¶¯Ì¬´´½¨×ӽڵ㣬²¢ÀûÓÃÑùʽ±íËõ½øÍê³ÉÊ÷ÐÎÁбíµÄ»ù±¾¿ò¼Ü¡£³ýÁËÕâÒ»µãÍ⣬»¹ÓÐÏÂÃæһЩÎÊÌâÐèÒª¿¼ÂÇ¡£
1£®½«¸¸½ÚµãËùÓеÄ×Ó½Úµã·ÅÈëÒ»¸öÈÝÆ÷ÖÐ
»ù±¾Ô­ÀíÒ³ÃæÖнö°üº¬ÁË´´½¨×Ó½ÚµãµÄ¹¦ÄÜ£¬²»¿ÉÒÔ½«´´½¨ºÃµÄ½ÚµãÔÙ½øÐйرղÙ×÷¡£Êµ¼ÊÓ¦ÓÃÖв˵¥×ÜÊÇ°üº¬´ò¿ªºÍ¹Ø±ÕÁ½ÖÖ² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ