惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - VortexDragon(旋风龙)

tt 揭露中国房地产的真实面目 3分钟保证让你看明白[转] 一个交警的吐血警告,所有开车和坐车的同胞都要看一看(转) 分块云计算[转] (转)Jabber Jabber服务器部署[转载] 迈克尔·杰克逊Michael Jackson,仅此记念 两种老公 两种人生 奇怪的jquery设置 attr出错 北京朝阳区电子眼查询 电子眼--关于公布固定式交通技术监控设备设置地点的公告 558条停车秩序严管大街 爆笑的公交车广告 后台动态加载iframe的URL asp.net 转:Asp.net 备份、还原Ms SQLServer及压缩Access数据库 美国人一天拿走250亿 ,公然卖国的条款 心系灾区网页灰色 天籁童声Declan Galbraith—Tell Me Why 转[和讯博客] 365Key的Web Service接口介绍
jquery 判断对象是否存在
VortexDragon(旋风龙) · 2009-05-29 · via 博客园 - VortexDragon(旋风龙)

今天一段代码需要判断一个jquery对象是否存在,google了一下,发现跟想的差不多 if (!$(”#oo”)) 或者 if ($(”#oo”)!=null),更有 if (typeof($(”#oo”))==”undefault”),看起来貌似都可用,但是实际测试一下就发先完全是错误的,即便不存在的对象jquery也会给虚拟出来一个真实的object,最后我只能用 .length>0 来进行判断了,哎,不知道是不是我们用的jquery版本不同,还是这些人相当然,不去测试就给出答案,如果是这样就太不负责任了。

posted on 2009-05-29 15:35  VortexDragon(旋风龙)  阅读(2222)  评论(1)    收藏  举报