Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
668 views
in Technique[技术] by (71.8m points)

ajax - JavaScript: Which should I use, Microsoft.XMLHTTP or Msxml2.XMLHTTP?

There are two progid's. I've seen both used.

Anyone have any insight as to when I should use one, versus the other?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should definitely not use Microsoft.XmlHttp.

From the Microsoft XML Team blog: Using the right version of MSXML in Internet Explorer:?(archive)

MSXML2 vs. Microsoft namespace – I’ve also seen a lot of code that instantiates the "Microsoft.XMLHTTP" ActiveX object rather than the MSXML2.XMLHTTP.3.0 or MSXML2.XMLHTTP.6.0 if you’re using 6.0. The “Microsoft” namespace is actually older and is only implemented in MSXML3 for legacy support. It’s unfortunate we used the “better” name on the older version, but stick to the “msxml2” namespace when instantiating objects.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...