---
title: "Firefox/Chrome/Safari的中可直接使用$/$$函数进行调试"
author: "zhouyrt"
date: "2011-12-21T18:26:57Z"
tags: []
categories: ["Web前端"]
slug: "firefox-chrome-safari"
draft: false
lastmod: "2011-12-21T18:29:15Z"
id: 1319914
url: "https://snandy.iteye.com/blog/1319914"
---

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

 

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

 

$ 相当于 document.getElementById

$$ 相当于 document.querySelectorAll

 

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

![](http://dl.iteye.com/upload/attachment/609413/208c8d0b-7d8e-30c3-ba8d-2e0d8c7a2902.png)