Home  >  Article  >  Web Front-end  >  客户端 使用XML DOM加载json数据的方法_javascript技巧

客户端 使用XML DOM加载json数据的方法_javascript技巧

WBOY
WBOYOriginal
2016-05-16 18:19:10941browse

步骤:
  1、引用Jquery
  2、如果是IE,实例ActiveXObject;Firefox,实例DOMParser。
  3、处理

复制代码 代码如下:















调用客户端XmlDom


显示数据:







在FireFox下,我测试时发现,将XML字符串直接给Jquery,Jquery也能直接处理;但在IE下不行。如下边代码。
复制代码 代码如下:


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn