哈希签到jQuery调用 [英] Hash sign in jQuery calls

查看:69
本文介绍了哈希签到jQuery调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为一个实用的编码器,我倾向于错过一些明显的东西,我想知道,

Being a pragmatic coder I tend to miss some obvious things and I wonder, What's the difference between

$('loc')
$('#loc')

信息越多更好地了解#

推荐答案

$('loc')元素选择器,正在寻找< loc> elements。

$('loc') is an element selector, looking for <loc> elements.

$('#loc') #id 选择器,寻找 id =loc elements。

$('#loc') is an #id selector, looking for id="loc" elements.

在查看几乎所有的时候想想CSS jQuery选择器,如果在大多数情况下不相同,它们非常关闭。

Think CSS when looking at almost all jQuery selectors, they're very close if not identical in most cases.

这篇关于哈希签到jQuery调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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