ÍêÃÀAjaxÀà,Ö§³Öʼþ
<scrīpt Language="Javascrīpt">
<!--
// author:±¼ÌÚµÄÐÄ
// qq:7180001
function Ajax(OnError,OnState,OnDownloadEnd)
{
this.ErrorStr = null;
this.OnError = OnError;
this.OnState = OnState;
this.OnDownloadEnd = OnDownloadEnd;
this.method = "GET";
this.URL = null;
this.sync = true;
this.PostData = null
this.RetData = null;
this.HttpObj = this.createXMLHttpRequest();
if(this.HttpObj == null)
{
return;
}
var ōbj = this;
this.HttpObj.onreadystatechange = function()
{
Ajax.handleStateChange(Obj);
}
}
Ajax.prototype.UTFTOGB = function(strBody)
{
var Rec=new ActiveXObject("ADODB.RecordSet");
Rec.Fields.Append("DDD",201,1);
Rec.Open();
Rec.AddNew();
Rec(0).AppendChunk
Ïà¹ØÎĵµ£º
Ò»°ãÀ´Ëµ£¬ÄãÖ»ÐèÒªÒ»¸ödwr.xmlÎļþ£¬²¢ÇÒ·ÅÖÃÔÚĬÈϵÄλÖãºWEB-INF/dwr.xml¡£ Èç¹ûÄÇÑùµÄ»°£¬Äã¿ÉÒÔ²»ÓÃÁ˽âÏÂÃæµÄÅäÖá£
ÓÐÈý¸öÔÒòʹÄãÏ£ÍûÖ¸¶¨²»Í¬Î»ÖõÄdwr.xmlÎļþ¡£
ÄãÏ£ÍûÈÃdwr.xmlÎļþºÍËüÄÜ·ÃÎʵ½µÄ×ÊÔ´ÔÚÒ»Æð¡£ÔÚÕâÖÖÇé¿öÏÂÄãÐèÒªÒ»¸öÕâÑùµÄÅäÖ㺠<param-value>WEB-INF/classes/com/yourco/dwr/dwr. ......
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>xmlhttprequest ajax demo</title>
<script type ="text/javascript" language ="javascript" >
......
//Óû§ÃûУÑéµÄ·½·¨
//Õâ¸ö·½·¨½«Ê¹ÓÃXMLHTTPRequest¶ÔÏóÀ´½øÐÐAJAXµÄÒì²½Êý¾Ý½»»¥
var xmlhttp;
function verify() {
//0¡£Ê¹ÓÃdomµÄ·½Ê½»ñÈ¡Îı¾¿òÖеÄÖµ
//document.getElementById("userName")ÊÇdomÖлñÈ¡ÔªËØ½ÚµãµÄÒ»ÖÖ·½·¨£¬Ò»¸öÔªËØ½Úµã¶ÔÓ¦HTMLÒ³ÃæÖеÄÒ»¸ö± ......
ÔÚweb.configÖÐÐÞ¸ÄÐÞ¸ÄÊôÐÔ
1£º<configSections><configSections>ÖмÓÏÂÃæ´úÂë
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral ......
jqueryͨ¹ýpost´«µÝÊý¾Ýµ½·þÎñÆ÷£¨²»Ê¹Óòå¼þ£©£º
<html>
<head>
<title>Untitled Page</title>
<script language="javascript" type="text/javascript" src="js/jquery-1.3.1.js"></script>
<script language="ja ......