600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > firefox中JS读取XML文件【javascript】

firefox中JS读取XML文件【javascript】

时间:2023-05-06 16:00:42

相关推荐

firefox中JS读取XML文件【javascript】

web前端|js教程

firefox中JS读取XML文件

web前端-js教程

firefox中JS读取XML文件

在网上搜“firefox中JS读取XML文件”的方法,找了半天,好多都是问了没人答的。看到一堆程序员在抱怨firefox:“除了累死程序员没什么好处。”,言归正传。firefox不支持ie中的ActiveXObject对象,要得到一个XML DOM有以下2种方法:

1、document.implementation.createDocument(“”, “”, null);

2、window.XMLHttpRequest

示例:1、var dom=document.implementation.createDocument(“”, “”, null);

dom.async=false;

dom.load(“test.xml”);//dom就是xml对象了。

2、var oXmlHttp = new XMLHttpRequest() ;

oXmlHttp.open( “GET”, “test.xml”, false ) ;

oXmlHttp.send(null) ;

//oXmlHttp.responseXML就是xml对象了。

二手网站源码,ubuntu两点,爬虫脚本语言,php 处理&,django SEO优化lzw

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。