jQuery登录IE:如何获取对象? [英] jQuery logging in IE: how to get object?

查看:216
本文介绍了jQuery登录IE:如何获取对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过Firefox + Firebug,可以向控制台写出一个jQuery对象,控制台将非常详细地显示DOM中引用的特定对象。

Via Firefox+Firebug one can write out to the console a jQuery object and the console will, in great detail, show you what that particular object is referring to in the DOM.

console.log($(mySelector))

在IE8中,使用IE8开发工具,我还可以访问控制台日志,它将如上所述写出。但是,就像做一个警告($ myObject)所有我得到返回的是一个gneric对象:

In IE8, using the IE8 Developer Tools, I also have access to a console log, which will write out as above. However, just like doing an alert($myObject) all I get returned is a gneric object:

LOG: [object Object]

有没有办法让IE显示更多的细节,而不是这是一个对象?

Is there a way to get IE to show me more detail other than 'this is an object'?

推荐答案

一种方法是使用 Firebug Lite 用于IE,同样调用console.log。您可以将其作为脚本资源包含在目标网页中,也可以将其作为书签保存在IE中,并在需要时加载。

One way would be to use Firebug Lite for IE with the same call to console.log. You can either include it as a script resource in the target page or save it as a bookmarklet in IE and load it whenever it's needed.

这篇关于jQuery登录IE:如何获取对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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