¼±¼±£¡£¡ajax ÖÐÎÄÂÒÂë - Java / Web ¿ª·¢
ÔÚservletÖУ¬ÓÐÖÐÎÄ´«µÝµ½Ò³ÃæÖеÄjsÀïÃ棬ÔÚjsÏÔʾÖÐÎÄʱ£¬³öÏÖÂÒÂë¡£
serletÀïÃ沿·Ö´úÂ룺
Java code:
StringBuffer sb=new StringBuffer("<nprovince>");
for(City city:clist){
sb.append("<scity>").append(city.getCityId()).append("</scity>");
sb.append("<scity>").append(new String(city.getName().getBytes("iso8859-1"),"utf-8")).append("</scity>");
//´«µÝÖÐÎÄÃû³Æ¡£
}
sb.append("</nprovince>");
jspÖеÄjs²¿·Ö´úÂ룺
JScript code:
if(req.status == 200){
var city=req.responseXML.getElementsByTagName("scity");
var str=new Array();
var strname=new Array();
for(var i=0;i<city.length;i=i+2){
str[i]=city[i].firstChild.data;
strname[i]=city[i+1].firstChild.data;
alert(unescape(strname[i]));//ÖÐÎÄÂÒÂë
}
buildSelect(str,strname,document.getElementById("scity"));
}
CSS code:
Ôڵõ½response.writer();֮ǰ£¬
ÉèÖÃresponse.setCharac
Ïà¹ØÎÊ´ð£º
JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥
JSPÒ³Ã潫²ÎÊýPOST¸øservlet
ÒªÇóÈçÏÂ;
1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 52 in the jsp file: /vip_info.jsp
ÕË cannot be resolved
49: <table border="1& ......
ÓÃStruts2+Spring+Hibernate×öµÄÒ»¸öwebµÄERPСÏîÄ¿£¬×ܲ¿Ò»Ì¨·þÎñÆ÷£¨Êý¾Ý¿âÓëWeb·þÎñÆ÷ÔÚͬһ»ú×ÓÉÏ£©Êǵ¥¶À²¦ºÅÉÏÍøµÄ£¬Óë·Ö¹«Ë¾Ã»ÓÐÓþÖÓòÍøÏߣ¬Ó²¼þÌ«¹óÁË£¬ÆäËû¼¸¸öÊ¡Êзֹ«Ë¾¶¼À´·ÃÎÊÕâÒ»·þÎñÆ÷£¬¸Ð¾õºǫ́´ú ......