ajax µÄÎÊÌâ¡£
function send_Pricerequest(url,obj)
{
http_Pricerequest = false;
if(window.XMLHttpRequest)
{
http_Pricerequest = new XMLHttpRequest();
if (http_Pricerequest.overrideMimeType)
{
http_Pricerequest.overrideMimeType("text/xml");
}
}
else if (window.ActiveXObject)
{
try
{
http_Pricerequest = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
http_Pricerequest = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{}
}
}
if (!http_Pricerequest)
{
return false;
}
http_Pricerequest.onreadystatechange = obj;
http_Pricerequest.open("GET", url, true);
http_Pricerequest.send(null);
}
function ShowResult()
{
var rText="";
if (http_Pricerequest.readyState == 4)
{
if (http_Pricerequest.status == 200)
{
rText=http_Pricerequest.responseText.replace(/^\s*/,"");
if (rText=="")
{
rText=" <div class='w'>Error </div>";
}
document.getElementById("ShowDiv")
Ïà¹ØÎÊ´ð£º
µÚ14Õ µÄÊ÷ÐͲ˵¥µÄÀý×Ó²»ÄÜÔÚIEÖÐÕý³£ÏÔʾ£¨Ê÷µÄ½á¹¹¿ÉÒÔÕ¹¿ª£¬µ«Õ¹¿ªºóÔÙµã»÷¾Í²»ÄÜÊÕËõÁË£©£¬µ«ÄÜÔڹȸèä¯ÀÀÆ÷ÖÐʹÓã¬Óп´´ËÊéµÄÅóÓÑÄÜÖ¸µãÏÂÂð£¿
ºÃÌù ºÇ
dfgfgfgffffff
лл¡£
......
ǰ̨´úÂ룺
C# code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="tttt.aspx.cs" Inherits="tttt" %>
<%@ Register Assembly="System.W ......
HTML code:
<form action="<%=request.getContextPath()%>/advertAdd.adp?op=Y" id="addAdvertForm" name="addAdvertForm" method="post" enctype="mult ......
ÎÒÔÚÒ³ÃæÖÐÊäÈëÓ¢ÎÄÊÇÕý³£µÄ£¬ÊäÈëÖÐÎÄ·µ»ØµÄjson×îºóÉÙÁ˵㶫Î÷±È½ÏÕý³£·µ»ØÊÇ
{ "success ":true}
ÎÒ´«ÖÐÎĽøÈ¥·µ»Ø³öÀ´¾ÍÊÇ
{ "success ":fals
ΪÉÙÒ»²¿·Ö¶«Î÷
ÎÒÊÇÖ ......