Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÓëSessionµÄÎÊÌâ - .NET¼¼Êõ / ASP.NET

֮ǰÓöµ½Ò»¸öÎÊÌâ¡£
ÓÚÊÇ×öÁËÒÔÏÂʵÑ飺
Ò³Ãæ¼ÓÔØºó£¬Ìá½»Ò»¸öAjaxÇëÇó(ÔݳÆÎªajax1)£¬ÇëÇóµÄÏß³ÌÔÚ·þÎñÆ÷Éϱ»Ë¯Ãß10ÃëÖÓ¡£
µã»÷Ò³ÃæÉÏÒ»¸öbutton£¬´¥·¢ÁíÒ»¸öAjaxÇëÇó(ajax2)¡£
µ±Ã»ÓÐʹÓÃsession£¬ÔÚ·þÎñÆ÷δ´ ......

Hibernate+spting+struts+ajax ÕûºÏÎÊÌâ

´ó¼ÒºÃ£¬Çë¸ßÊÖÃÇÖ¸µã
ÎÒµÄservletÎļþÊÇ£º
package com.ljc.rank.ajax;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
......

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

ǰ̨´úÂ룺
C# code:

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

¹ØÓÚAJAX´«ÊäJSONÊý¾ÝÊý¾ÝÁ¿ÎÊÌâ

AJAX´«ÊäJSONÊý¾Ý.¶ÔÓÚÖÐÎÄÈç¹ûʹÓÃUTF8±àÂë
ÎÒµÄÈÕÖ¾ÎļþÖмǼµÄ´«ÊäµÄ3¸öÖÐÎÄÈç"\u8d85\u7ea7\u798f"
ÔÚʵ¼Ê´«ÊäÖÐÊDz»ÊÇÕ¼ÓÃ18¸ö×Ö½Ú..
Ò²¾ÍÊÇ˵һ¸öÖÐÎÄʹÓÃJSON´«ÊäÔòÿ¸öÖÐÎÄÐèÒªÕ¼ÓÃ6×Ö½ ......

ʲôʱºòä¯ÀÀÆ÷¾ß±¸ajax¹¦ÄܵÄ

ajaxË­¸ã³öÀ´µÄ¼¼Êõ°¡

µ½µ×Ôõô»ØÊ°¡£¬ÊÇ΢ÈíŪµÄÂ𣬻¹ÊÇgoogle °¡£¬»¹ÊÇÄĸöä¯ÀÀÆ÷¹«Ë¾°¡

The concept behind the XMLHttpRequest object was originally created by the developers of Outlook Web Ac ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ