浏览器F12看有些代码后面带有一个"==$0",表示什么意思?如下图所示:
https://developers.google.com/web/tools/chrome-devtools/debug/command-line/command-line-reference
The $0, $1, $2, $3 and $4 commands work as a historical reference to the last five DOM elements inspected within the Elements panel or the last five JavaScript heap objects selected in the Profiles panel. $0 returns the most recently selected element or JavaScript object, $1 returns the second most recently selected one, and so on.
选中这个dom之后,在console里面输出 $0, 你会发现就是当前这个dom
估计就是这个作用吧
不知道你用的什么版本,我的能输出,但是没有 == $0 这个标记
快速选择元素,比选择器方便很多。
我也遇到这个问题,请问你解决了吗?我在js之后会有[object object]==$0
没啥意义,后台代码有那里写错留下文本吧