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

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")


Ïà¹ØÎÊ´ð£º

ajaxÏê½âµÄÒÉÎÊ

µÚ14Õ µÄÊ÷ÐͲ˵¥µÄÀý×Ó²»ÄÜÔÚIEÖÐÕý³£ÏÔʾ£¨Ê÷µÄ½á¹¹¿ÉÒÔÕ¹¿ª£¬µ«Õ¹¿ªºóÔÙµã»÷¾Í²»ÄÜÊÕËõÁË£©£¬µ«ÄÜÔڹȸèä¯ÀÀÆ÷ÖÐʹÓã¬Óп´´ËÊéµÄÅóÓÑÄÜÖ¸µãÏÂÂð£¿
ºÃÌù ºÇ

dfgfgfgffffff


лл¡£
......

Ò»¸öºÜ¼òµ¥µÄAJAX»¥¶¯£¬ÎªÊ²Ã´Ò³Ã滹ÊÇ»áˢУ¿£¿

ǰ̨´úÂ룺
C# code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="tttt.aspx.cs" Inherits="tttt" %>
<%@ Register Assembly="System.W ......

Ä£ÄâajaxÉÏ´«Îļþ£¬ÎÞ·¨Çå¿Õform

HTML code:

<form action="<%=request.getContextPath()%>/advertAdd.adp?op=Y" id="addAdvertForm" name="addAdvertForm" method="post" enctype="mult ......

stuts2 ¿ò¼Ü ºÍextjs ajax´«ÖÐÎÄÎÊÌâ

ÎÒÔÚÒ³ÃæÖÐÊäÈëÓ¢ÎÄÊÇÕý³£µÄ£¬ÊäÈëÖÐÎÄ·µ»ØµÄjson×îºóÉÙÁ˵㶫Î÷±È½ÏÕý³£·µ»ØÊÇ
{ "success ":true}

ÎÒ´«ÖÐÎĽøÈ¥·µ»Ø³öÀ´¾ÍÊÇ
{ "success ":fals
ΪÉÙÒ»²¿·Ö¶«Î÷

ÎÒÊÇÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ