一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

jquery ajax 加载xml文档

时间:2010-09-18 编辑:简简单单 来源:一聚教程网





jquery ajax 加载xml文档

方法二



很多时候无法解析就是content-type的问题。如果本身就是xml文件,请跳过这一步。
   动态生成的xml一定要将其设置为text/xml,否则默认就是text/html也就是普通的文本。   常见语言的content-type设置:
   response.setheader("contenttype","text/xml");  //jsp教程
   response.contenttype= "text/xml"; //asp教程
   header("content-type:text/xml"); //php教程

热门栏目