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

struts2 Ò³ÃæÉÏ ajax responseText ·µ»Ø¿Õ

JScript code:

var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")


function ajaxTest() {

var starttime = document.getElementById("starttime").value;
var endtime = document.getElementById("endtime").value;
var url = "http://localhost:8080/iReport/Money.action£¿starttime="+starttime+"&endtime="+endtime;
var url = "index.jsp";
alert(url);
xmlhttp.open("GET", url, true);// HTTP ÇëÇóµÄ·½Ê½, URL, ÊÇ·ñÒì²½
xmlhttp.onreadystatechange = mychange;

xmlhttp.send(null);
}
function mychange() {

if(xmlhttp.readyState == 4) {
// alert(xmlhttp.readyState);
alert(xmlhttp.responseText);

document.getElementById('weather').innerHTML = xmlhttp.responseText;
}
}





ÕâЩÊÇÒ³ÃæÉϵÄajax´úÂ룬urlÊÇÒ»¸östruts2ÇëÇ󣬾­¹ý²âÊÔÒ²¶¼ÊÇ¿ÉÒÔÖ´Ðеģ¬µ«ÊÇ·µ»ØÖµÀïÃæxmlhttp.responseTextΪ¿Õ²»ÖªµÀΪʲô£¬Áí£ºÕâ¸öurlÇëÇóÊÇÒ»¸öjfreechart±¨±íÇëÇó ²»ÖªµÀÓÐÓ°Ïì²»£¬Ã»¸ã¹ýÕâЩ£¬¸ßÊÖ°ï°ïæ¡£
²»»á£¬°ï¶¥
Äã·µ»ØÊý¾ÝÊÇʲô

·µ»ØµÄÓ¦¸ÃÊÇÉú³ÉµÄjfreechart±¨±íͼ

ûÓп´ºǫ́´úÂë, ²»ºÃ˵.

ÒýÓÃ
·µ»ØµÄÓ¦¸ÃÊÇÉú³


Ïà¹ØÎÊ´ð£º

´ó¼Ò¿´¿´ÎҵĴúÂëÓÐʲôÎÊÌ⣨¹ØÓÚajaxµÄ£©

ÔÚ¼ÒÑо¿ajax£¬¿´Á˱ðÈ˵ÄÒ»¸öÍøÉϹºÎïÉ̳ÇÏîÄ¿µÄÔ´´úÂ룬×Ô¼ºÒ²À´·Â±ðÈ˵Ķ«Î÷Á·Ï°Á·Ï°£¬Ã»Ïë³öÎÊÌâÁË£¡Ò»ÏµÄÕâЩ´úÂëÊÇÎÒ·ÂÕÕ±ðÈËдµÄ¡£ÎÒÊÇÏëÈÃ×¢²áµÄÈËÌîдÓû§Ãû£¬¹â±êÀ뿪Óû§ÃûºóÃæµÄÌîд¿Õ°×´¦ºóÁ¢¿ÌÀûÓÃaj ......

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

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

import java.io.IOException;

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

ÈçºÎ»ñÈ¡AjaxÒ³ÃæÖÐinnerHtml

Èç½ðɽ´Ê°ÔÍøÒ³×óÉϽÇÉϵÄÿÈÕÒ»¾ä
$('#elementID').html();
Ó¦¸Ã¿ÉÒÔ°É

±ð³ÁÁË°¡£¡~£¡

ÎÊÌâ²»¹»ÇåÎú

document.getElementById("¿Ø¼þID").innerHtml;

h ......

ajaxÔõôʵÏÖÐÂÔöÏÂÀ­ÁбíÎÞˢР- Web ¿ª·¢ / Ajax

ajaxÔõôʵÏÖÐÂÔöÏÂÀ­ÁбíÎÞˢС£ÀàËÆ
http://hi.baidu.com/comasp/blog/item/aa34e736bfc269320a55a9ad.html¡£
»¹ÓÐÍøÒ×163Blog£¬Ìí¼Óblogʱ£¬Èç¹ûдµÄÎÄÕÂûÓкÏÊʵķÖÀà¿ÉÑ¡£¬¿ÉÒÔµã»÷Ìí¼ÓеÄÎÄÕÂÀàÐÍ£¬È»ºóÌ ......

vs2008Ìí¼ÓAjax¿Ø¼þAjaxControlToolkit.dllʱ³ö´í

Ìí¼Óʱ±¨µÄ´íÎ󣺡°Î´ÄܼÓÔØÎļþ»ò³ÌÐò¼¯¡°System.Web.Exensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35¡±»òËüµÄ
ijһ¸öÒÀÀµÏϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£¡±
Çë¸ßÊÖÃÇÖ¸µãһϣ¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ