我如何判断和QUOT;中止()"被称为上XMLHTT prequest

问题描述:

简单的问题,但是从Mozilla的JS文档并不明显。任何人都知道了他们的头顶部的答案?

Simple question, but not obvious from the Mozilla JS docs. Anyone know the answer off the top of their head?

下面是标准的执行情况。基于以下,唯一的办法是检查对象的readyState,但不会在所有浏览器。

Here's the standard implementation. Based on below, the only way is to check the readyState of the object, however this won't work in all browsers.

语法

XMLHtt prequest.abort()返回值

XMLHttpRequest.abort() Return Value

没有返回值。

备注

中止是在Windows介绍   Internet Explorer 7中。

abort was introduced in Windows Internet Explorer 7.

Abort方法中断的   正在进行中的异步操作。   (传真到了varAsync参数   打开创建异步   请求。)

The abort method interrupts an asynchronous operation in progress. (Pass true to the varAsync parameter of open to create an asynchronous request.)

调用中止重置对象;该   onreadystatechange事件处理程序   除去,并且readyState的变更为   0(未初始化)。

Calling abort resets the object; the onreadystatechange event handler is removed, and readyState is changed to 0 (uninitialized).

来源