浏览器默认的全局$功能 [英] Browser default global $ function

查看:124
本文介绍了浏览器默认的全局$功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到在某些浏览器中似乎有一个名为$的全局函数,它不是jQuery,但是我似乎找不到任何

I've noticed that there appears to be a global function called $ in some browsers which is NOT jQuery, but I can't seem to find any documentation on it. What is it?

Firefox:

Firefox:

Chrome:

推荐答案

Chrome和Firefox开发人员工具包含一些有用的快捷键/帮助程序,可在控制台内操作DOM.

Chrome and Firefox dev tools include some useful shortcuts/helpers to manipulate the DOM within the console.

这两种快捷方式都非常相似:$用于DOM选择,$0-$4用于最后X个选择"等等.

These shortcuts are pretty similar for both: $ for DOM selection, $0-$4 for "last X selections" and more.

有关完整参考,请参见:

For full reference see:

  • Chrome Dev Tools Command Line API - https://developers.google.com/web/tools/chrome-devtools/console/command-line-reference
  • Firefox Web Console Helpers - https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Helpers

这篇关于浏览器默认的全局$功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆