程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