console.log() doesn't work in Safari 6.0 Web Inspector

后端 未结 6 1813
野的像风
野的像风 2021-01-07 20:24
console.log(\'hi\');

undefined

Is there any similar implementation in 6.0? or Did I do something wrong?

6条回答
  •  说谎
    说谎 (楼主)
    2021-01-07 20:39

    If you are using JQuery what I do is dynamically add an ouput field to the page so I can see JavaScript values. The z-index is to keep it on the top. Style it however you want. I usually add a colored border or bright background color so it is easy to find on screen.

    var output= 'hello';
    $('body').append("
    " + output + "
    ");

提交回复
热议问题