ajaxµÄÑ¡Ï
×î½üÏëѧϰһÏÂajax,¿ÉÊǸտ´ÁËÒ»µã¾ÍÓÐÎÊÌâÁË£¬Ñ§Ï°Ò»¸öÑ¡Ï£¬²»³öЧ¹û£¬¸Ð¾õÒѾºÍÊéÉÏÒ»ÑùÁË£¬Çë´óÏÀ°ïæ
´úÂ룺
<!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=utf-8" />
<title>????? </title>
<script type="text/javascript">
xmlhttp=false;
if(window.ActiveXObject)
{
try{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
// alert("You are using Internet Explore.");
}catch(e){
try{
//if IE
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
// alert("You are using Internet Explore.");
}catch(e){
//Or must not IE
xmlhttp=false;
}
}
}
else {
if(window.XMLHttpRequest){
xmlhttp=new XMLHttpRequest();
// alert("You are not using Internet Explore.");
}
}
function makerequest(serverPage,objID){
var obj=document.getElementById(objID);
xmlhttp.open("GET",serverPage);
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4 &&a
Ïà¹ØÎÊ´ð£º
Ìí¼Óʱ±¨µÄ´íÎ󣺡°Î´ÄܼÓÔØÎļþ»ò³ÌÐò¼¯¡°System.Web.Exensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35¡±»òËüµÄ
ijһ¸öÒÀÀµÏϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£¡±
Çë¸ßÊÖÃÇÖ¸µãһϣ¬ ......
HTML code:
<form action="<%=request.getContextPath()%>/advertAdd.adp?op=Y" id="addAdvertForm" name="addAdvertForm" method="post" enctype="mult ......
°´Å¥·ÅÔÚUpdatePanel1£¬Ïëͨ¹ýµã»÷µ÷ÓÃDictionaryTvAdd.aspxµ¯³öÒ»¸ö×Ó´°Ìå
ÓÃÏÂÃæµÄÓï¾äÌáʾÎÒȱÉÙ¶ÔÏó
protected void Button1_Click(object sender, EventArgs e)
{
ScriptManager.R ......
AjaxÊÇ»ùÓÚJavaScriptµÄ£¬¶øjs³öÓÚ°²È«¿¼ÂÇÊDz»ÄܲÙ×÷ÎļþµÄ£¬ËùÒÔAjax²»ÄÜÖ±½ÓÉÏ´«¸½¼þ£¬¿ÉÒÔÓÃÆäËû±äͨ·½Ê½ÊµÏÖ¡£
µ«ÊÇAjaxÌá½»Ò²ÊÇ»ùÓÚHTTPÐÒéµÄ£¬ËüÒ²·ÖGETºÍPOSTÌá½»·½Ê½£¬¿ÉÒÔ°Ñ±íµ¥ÄÚÈݷŵ½ÏûÏ¢ÌåÖУ¬Õ⺠......