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

推荐订阅源

V
Vulnerabilities – Threatpost
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Privacy International News Feed
F
Full Disclosure
P
Proofpoint News Feed
The Hacker News
The Hacker News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
The Blog of Author Tim Ferriss
T
Threatpost
L
Lohrmann on Cybersecurity
I
Intezer
S
SegmentFault 最新的问题
小众软件
小众软件
T
Threat Research - Cisco Blogs
MongoDB | Blog
MongoDB | Blog
美团技术团队
NISL@THU
NISL@THU
罗磊的独立博客
N
News | PayPal Newsroom
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - 聂微东
W
WeLiveSecurity
Microsoft Security Blog
Microsoft Security Blog
阮一峰的网络日志
阮一峰的网络日志
Scott Helme
Scott Helme
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
A
Arctic Wolf
P
Privacy & Cybersecurity Law Blog
Attack and Defense Labs
Attack and Defense Labs
I
InfoQ
Microsoft Azure Blog
Microsoft Azure Blog
S
Securelist
D
Darknet – Hacking Tools, Hacker News & Cyber Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Schneier on Security
Schneier on Security
Know Your Adversary
Know Your Adversary
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
U
Unit 42
The Cloudflare Blog
T
Tenable Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Recent Announcements
Recent Announcements
D
DataBreaches.Net
量子位

博客园 - 一抹微蓝

git revert 和 git reset的区别 [JavaScript]Call和Apply方法 jQuery性能规则 把excel数据生成SQL语句 - 一抹微蓝 - 博客园 CSS长度单位及区别 em ex px pt in 一个在IE5.5,IE6,IE7,IE8都存在的BUG 同时登录多个MSN Visual Studio 2008 Service Pack 1 安装体验 VS2008常用快捷键 2、8、10、16进制的转换 推荐的 CSS 书写顺序 页面中 CSS 加载方式的优化 link 和 style 元素在 HTML 文档中的位置 图片垂直居中的使用技巧 Visual Studio 常用快捷键 div+css实现Firefox和IE6兼容的垂直居中 FireFox与IE开发上的一些区别 CSS兼容IE/Firefox要点 IE FireFox对CSS的不同解释收集
遍历JavaScript对象的所有属性
一抹微蓝 · 2008-07-22 · via 博客园 - 一抹微蓝

/* 
* 用来遍历指定对象所有的属性名称和值 
* obj 需要遍历的对象 
*/  
function allPrpos(obj) {  
    
// 用来保存所有的属性名称和值 
    var props = ""
    
// 开始遍历 
    for(var p in obj){  
        
// 方法 
        if(typeof(obj[p])=="function"){  
            obj[p](); 
        }
else{  
            
// p 为属性名称,obj[p]为对应属性的值 
            props+= p + "=" + obj[p] + "\t"
        }  
    }  
    
// 最后显示所有的属性 
    alert(props); 
}

posted @ 2008-07-22 17:50  一抹微蓝  阅读(1288)  评论(0)    收藏  举报

刷新页面返回顶部