Firefox/Chrome/Safari的中可直接使用$/$$函数进行调试

原文:http://www.cnblogs.com/snandy/archive/2012/02/12/2348122.html

偶然发现的,页面中没有引入Prototype和jQuery。控制台中敲$却发现是一个函数。又试着敲$$,也是个function。霍霍..

接着在各个浏览器中测试,发现Firefox/Chrome/Safari中有,IE9/Opera没有。

$ 相当于 document.getElementById

$$ 相当于 document.querySelectorAll

在chrome控制台敲$,$$一目了然

这两个函数都是浏览器调试工具自带的。

原文地址:https://www.cnblogs.com/suizhikuo/p/2348217.html