浏览器控制台里的$、$$是咋回事

程Hao同窗提到:
浏览器的控制台里,能够直接使用$、$$方法,但是这些方法,却不能被页面里的JS使用。web

赵WenBo同窗给出解答:chrome

https://developers.google.com/web/tools/chrome-devtools/console/utilities   
https://developer.mozilla.org/en-US/docs/Tools/Web_Console/The_command_line_interpreter#Helper_commands浏览器

谷歌的说明:chrome-devtools

The Console Utilities API contains a collection of convenience functions for performing common tasks: selecting and inspecting DOM elements, displaying data in readable format, stopping and starting the profiler, and monitoring DOM events.函数

Warning: These functions only work when you call them from the Chrome DevTools Console. They won't work if you try to call them in your scripts.google

点赞一下IE的某些版本,还能够直接看到函数体:

spa

相关文章
相关标签/搜索