Displaying objects in IE Developer Tools console

前端 未结 8 814
野的像风
野的像风 2020-12-29 04:31

I\'m debugging my web application in Firefox, Chrome and Internet Explorer. With the latter I\'m using Developer Tools to debug my scripts.

The problem I\'m having i

相关标签:
8条回答
  • 2020-12-29 05:01

    If the Prototype API is an option, you can debug your objects like so:

    var obj = window.JSON.parse('{"d":"2010-01-01T12:34:56Z","i":123}');
    alert($H(obj).inspect());
    

    Other than that, I know of no other way to not get the really helpful {...}.

    0 讨论(0)
  • 2020-12-29 05:04

    Try this in the console script window:

    for (var a in object) {
        console.log("object["+a+"]="+object[a])
    }
    

    For example,

    for (var a in document.head){
        console.log("document.head["+a+"]="+document.head[a])
    }
    
    0 讨论(0)
提交回复
热议问题