即obj.attachEvent的例子() [英] examples of ie obj.attachEvent()

查看:221
本文介绍了即obj.attachEvent的例子()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

没有人知道如何工作的obj.attachEvent在IE浏览器?

does anyone know how works the obj.attachEvent on ie?

我试了几个例子,但他们不工作。还与IE7这兼容吗?

I tried a few examples but they don't work. Also is this compatible with ie7?

我的尝试是这样的:

var onload = function( ) {
        console.log("intercepting: " + this.status + " " + this.responseText);
    };

if($.browser.msie){
   console.log("it's IE...");
   this.attachEvent("load", onload);
}

以上所有内部的XMLHtp prequest。

All above inside an XMLHtppRequest.

推荐答案

您可能要分配的功能 xhrObject.onreadystatechange

这篇关于即obj.attachEvent的例子()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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