Display object contents - JS/jQuery

前端 未结 4 612
走了就别回头了
走了就别回头了 2021-02-05 21:51

With $(this).data(\"events\"); returning [object Object], I need to see what\'s actually going on in there. I found this:

var Finder =         


        
4条回答
  •  名媛妹妹
    2021-02-05 22:08

    You can use .toSource() to turn JavaScript objects into a string representation that you can view without a nice error console like in Firebug or Chrome Dev. Tools:

    alert($(this).data("events").toSource());
    

提交回复
热议问题