ajax的xmlHttpRequest对象和activeX对象的技术区别是什么 [英] what is the technical difference b/w xmlHttpRequest object and activeX Object of ajax

查看:83
本文介绍了ajax的xmlHttpRequest对象和activeX对象的技术区别是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请尽早给我答案。

推荐答案

ActiveX通常是Windows的功能。 IE的旧版本支持在浏览器内部使用ActiveX控件的功能。但是,没有其他浏览器(或操作系统)支持此功能。

ActiveX in general is a Windows feature. Old versions of IE supported the ability to use ActiveX controls inside the browser. However no other browser (or operating system) supports this feature.

ActiveX Ajax对象是Microsoft提供的ActiveX控件,可以在早期版本的Windows XP中使用。 IE浏览器再次,它只能在IE中使用。

The ActiveX Ajax object was a Microsoft-supplied ActiveX control, which was available to be used in early versions of IE. Again, it only worked in IE.

最近,网络标准组织提出了类似的功能,不需要ActiveX控件。这是XMLHttpRequest对象。现在,所有浏览器(包括较新版本的IE)都支持此功能。

More recently, the web standards body came up with a similar feature which didn't require an ActiveX control. This is the XMLHttpRequest object. This is now supported by all browsers, including newer versions of IE.

为了编写支持当前使用的所有浏览器的Ajax代码,您需要将其编写为支持这两种技术的一种方式,因为许多人仍在使用支持ActiveX但不支持标准XMLHttpRequest对象的IE较旧版本。

In order to write Ajax code which supports all browsers in current use, you need to write it in a way that supports either of these technologies, because many people are still using the older versions of IE that support ActiveX but don't support the standard XMLHttpRequest object.

在可能的情况下,您的代码应使用XMLHttpRequest对象,并且作为最后的选择只能使用老式的ActiveX控件。在某些情况下(不需要支持IE的较早版本),您可以完全删除ActiveX控件。

Where possible, your code should use the XMLHttpRequest object, and only fall back to the old-style ActiveX control as a last resort. In some cases (where you don't need to support older versions of IE) you can drop the ActiveX control entirely.

ActiveX作为浏览器中的一种技术通常不被接受。如今,它已成为许多安全问题的根源,并破坏了跨浏览器的兼容性。 Ajax控件几乎是唯一仍在使用的ActiveX控件。

ActiveX as a technology in the browser is generally frowned upon as these days, as it has been the cause of many security issues, and breaks cross-browser compatibility. The Ajax control is just about the only ActiveX control still in common use.

这篇关于ajax的xmlHttpRequest对象和activeX对象的技术区别是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆