cal*_*lum 8 google-chrome-devtools
如果我使用console.log
从脚本内部记录对象,我可以在控制台中看到该对象,我可以通过单击小箭头来检查它.所以我可以看到它有什么方法(即使在它的原型中).但是我可以在控制台中直接运行其中一种方法吗?
换句话说,是否有某种神奇的变量(类似于$0
)我可以在控制台中输入,它会让我最后记录的对象?
您实际上可以$_
用来获取先前评估的语句
$$ // Returns an array of elements that match the given CSS selector.
$0 // The currently-selected object in the inspector.
$_ // The previously evaluated statement
$1 // The previously-selected object in the inspector.
$n(index) // Access to an array of last 5 inspected elements.
Run Code Online (Sandbox Code Playgroud)
有关所有可用于铬的所有部分的完整列表,请查看备忘单.http://anti-code.com/devtools-cheatsheet/
归档时间: |
|
查看次数: |
585 次 |
最近记录: |