ajax ͨÓ÷½·¨
var xmlHttp;
// ´´½¨XMLHttpRequest¶ÔÏó
function createXMLHttpRequest() {
try {
// FireFox, Opera 8.0 +, Safari
xmlHttp = new XMLHttpRequest();
}
catch (e) {
try {
// IE 6.0 +
xmlHttp = new ActiveXObject('MSXML2.XMLHTTP');
}
catch (e) {
try {
// IE 5.5 +
xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
}
catch (e) {
alert('ÄúµÄä¯ÀÀÆ÷²»Ö§³ÖAJAX£¡');
return false;
}
}
}
}
function SendContent(url, type, data, handleMethod) {
createXMLHttpRequest();
xmlHttp.open(type, url);
xmlHttp.onreadystatechange = function() { postBack(handleMethod); };
xmlHttp.send(data);
}
function postBack(method) {
if (xmlHttp.readyState == 4) {
if (xmlHttp.status == 200) {
//var r
Ïà¹ØÎĵµ£º
10¸öÓÅÐãµÄAjaxºÍJavascript¹úÍâ×ÊÔ´ÍøÕ¾
תÔصØÖ·£ºhttp://www.zzsky.cn/build/content/1246.htm
1¡¢Ajax Rain: http://www.ajaxrain.com
¡¡¡¡AjaxRainÓкܶàÍêÃÀÕûºÏAjax¡¢CSS¡¢DHTML»òJavascriptµÄʵÀý£¬ÓÐһЩDemoµÄÈ·ÖµµÃÄãÈ¥¿´Ò»¿´£¬¼´Ê¹Äã²»ÊÇÍøÒ³Éè¼Æ£¨¿ª·¢£©Ê¦¡ ......
ÔÎĵØÖ·£ºhttp://sharethispoint.com/archive/2006/11/15/Build-web-parts-with-ajax.aspx
ÈçºÎÔÚ¿ª·¢Web²¿¼þʱʹÓÃajaxÄØ£¿ÎÒÃǽ«ÒÔÒ»¸öÑù×ÓÀàËÆMOSS 2007ÖÐKPIºÍBDC Web²¿¼þµÄWebPartΪÀýÀ´ËµÃ÷¡£Èç¹ûÄã¶ÔajaxÒ»µã¶¼²»Á˽â,ÍƼöѧϰTerryLeeµÄajaxÈëÃÅϵÁС£
ASP.net2.0ÓÐÒ»¸öºÜ¿áµÄÐÂÌØÐÔ½Ð×÷¿Í»§¶Ë½Å±¾»Øµ÷¡£½Å±¾»Øµ ......
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script type="text/ ......
var xmlhttp;
function verify()
{
//2.´´½¨XmlHttpRequest¶ÔÏó
//ÕâÊÇXmlHttpRequest¶ÔÏóÎå²½ÖÐʹÓÃ×ÔÓµÄÒ»²½
//ÐèÒªÕë¶ÔIEºÍÆäËûÀàÐ͵Ää¯ÀÀÆ÷½¨Á¢Õâ¸ö¶ÔÏóµÄ²»Í¬·½Ê½Ð´²»Í¬µÄ´úÂë
if(window.XMLHttpRequest)
{
......
´´½¨Ò»¸öµ¯³öDIV´°¿Ú¿ÉÄÜÊÇÏÖÔÚÍøÕ¾/ÍøÒ³ÖÆ×÷ÖÐ×î³£Åöµ½µÄÎÊÌâÖ®Ò»¡£´«Í³µÄJavaScriptµ¯´°ÒѾ²»ÊʺÏÄ¿Ç°ÍøÕ¾µÄÉè¼ÆÀíÄîÁË£¬ÀíÓÉÓжþ£ºÊ× ÏÈ£¬²»ÓѺ×—ÉúÓ²µÄµ¯³ö¶Ô»°¿òÇÒ°éËæ×Å“ßÑ”µÄÒ»Éù¶ÔÓû§ÌåÑéÊǸöºÜ´óµÄÌôÕ½£»Æä´Î£¬¼æÈÝÐÔ²»¹»Ç¿——ÓÐÏ൱¶àµÄä¯ÀÀÆ÷ÆÁ±ÎÁËÕâÖÖJSµÄAlert() ·½·¨¡ ......