zoukankan
html css js c++ java
javascript对象查看器
<
html
>
<
head
>
<
meta http
-
equiv
=
"
Content-Type
"
content
=
"
text/html; charset=gb2312
"
>
<
title
>
新建网页
3
</
title
>
</
head
>
<
body
>
<
table border
=
"
1
"
>
<
tr
>
<
td id
=
"
td
"
>
obj
</
td
>
</
tr
>
</
table
>
</
body
>
<
script language
=
"
javascript
"
>
<!--
window.obj
=
{
Name : 'lisq',
Old :
24
,
Birthday : '
1981
-
7
-
24
',
O :
{
o :
{
Name : 'lufang'
}
}
,
F:
function
()
{
var
i
=
100
}
}
var
td
=
document.getElementById('td')
td.onmouseover
=
function
()
{
Show(
this
.innerHTML)
}
function
ao(a,aa)
{
var
ab
=
0
;
while
(a
!=
null
)
{ab
+=
a[
"
offset
"
+
(aa
?
"
Left
"
:
"
Top
"
)];a
=
a.offsetParent}
return
ab}
var
arrDiv
=
[]
function
Show(objDescript)
{
var
o
try
{
o
=
eval(objDescript)
}
catch
(e)
{
alert(objDescript)
alert('dead here')
return
}
var
div
=
document.createElement('div')
div.style.border
=
'solid 1px'
div.style.position
=
'absolute'
if
(event.srcElement
==
window)
{
div.style.left
=
event.clientX
div.style.top
=
event.clientY
}
else
{
div.style.left
=
ao(event.srcElement.parentElement,
true
)
+
20
+
'px'
div.style.top
=
ao(event.srcElement.parentElement,
false
)
+
20
+
'px'
}
for
(p
in
o)
{
if
(
typeof
(o[p])
==
'object')
{
var
descript
=
objDescript
+
'[
"
' + p + '
"
]'
div.innerHTML
+=
'
<
span
><
a onclick
=
Show(\''
+
descript
+
'\') style
=
"
cursor:hand
"
>+</
a
>
'
+
p
+
'
</
span
><
br
/>
'
}
else
{
div.innerHTML
+=
'
<
span
>
'
+
p
+
':'
+
o[p]
+
'
</
span
><
br
/>
'
}
}
document.body.appendChild(div)
arrDiv.push(div)
div.onmouseout
=
function
()
{
//
this.style.display = 'none'
}
}
//
-->
</
script
>
</
html
>
查看全文
相关阅读:
Android系统启动过程分析
android的logcat 用法整理
git 使用详解(10) 远程分支
android的logcat 用法整理
android Binder工作流程
android Binder工作流程
git log 小结
linux patch 命令小结
windows 中 \r\n 区别于 类unix中的\n 疑问 迎刃而解
Mysql Error Code : 1436 Thread stack overrun
原文地址:https://www.cnblogs.com/boolean/p/607235.html
最新文章
BizTalk Server 2010 + SQL Server 2008 R2 通过集成创造更大价值 [ 下篇 ]
BizTalk Server 2010 + SQL Server 2008 R2 通过集成创造更大价值 [ 上篇 ]
Ext JS 4 Beta 3 今天可以下载了
目前RFID项目实施所遇问题总结 及 微软BizTalk RFID解决方案
Step by Step WebMatrix网站开发之二:使用WebMatrix(1)
BizTalk Server 2010 业务活动监视(BAM) [ 下篇 ]
BizTalk Server 2010 业务活动监视(BAM) [ 上篇 ]
MAC上wireshark错误:The capture session could not be initiated on interface 'en0' (You don't have permission to capture on that device).
exp,imp问题
直方图统计导致错误的执行计划
热门文章
昨天出现gc current request等待事件,介绍p1,p2,p3转换方法
Oracle对字符转义的处理
SQL 语句中对于like 的调优
[SQL] 如何遍历所有数据库
ORACLE进制转换函数
如何 找出未收集统计信息,以及统计信息过期的表
bitmap index 的研究
参数_kgl_large_heap_warning_threshold
Android系统启动过程分析
git 使用详解(10) 远程分支
Copyright © 2011-2022 走看看