www.2527.com_澳门新葡8455手机版_新京葡娱乐场网址_
做最好的网站

Jquery通过Ajax访谈XML数据的小例子Web前端

2019-11-23 01:22 来源:未知

页面js代码复制代码 代码如下:$.ajax({

url : '...',type : 'POST',dataType : 'xml',error : function {alert("Error loading XML document" xml);},success : function.find {alert);});}});后台输出代码复制代码 代码如下:public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response)throws Exception {

response.setContentType("text/xml; charset=utf-8");response.setCharacterEncoding;

PrintWriter pw = response.getWriter();Document doc = new Document();//获取XML文件doc.write;return null;}

TAG标签:
版权声明:本文由澳门新葡8455手机版发布于Web前端,转载请注明出处:Jquery通过Ajax访谈XML数据的小例子Web前端