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
>
查看全文
相关阅读:
Systemd 指令
2018年书单
2017年书单
Centos7 Devstack [Rocky] 重启后无法联网
kvm虚拟机操作相关命令及虚拟机和镜像密码修改
负载均衡原理-转
用配置文件里面的参数值替换yaml模板中的变量值【python】
linux工具之sar
利用系统缓存优化程序的运行效率
Elasticsearch单机部署
原文地址:https://www.cnblogs.com/boolean/p/607235.html
最新文章
spring mvc请求参数中文乱码解决方案
浏览器宽度和高度的说明
Spring Boot + Dubbo 可运行的例子源码-实现服务注册和远程调用
基于Redis的简单分布式锁的原理
Spring Date Jpa on update current_timestamp 自动维护创建时间和更新时间
Spring Data Jpa(Hibernate) OneToMany
Spring Boot Security 基于角色的访问控制
JQuery AJAX 全局设置
基于Spring Boot/Spring Session/Redis的分布式Session共享解决方案
Spring Mvc Rest为不支持DELETE/PUT的浏览器添加DELETE/PUT支持
热门文章
图片Exif 信息中Orientation的理解和对此的处理
Elasticsearch mysql 增量同步 三表联合 脚本
selenium操作cookie
win10自定义右键新建文件
排错:Unable to create a new session key. It is likely that the cache is unavailable.
selenium死活定位不到元素以及radio单选框点击不生效
pytest+allure展示环境信息
pipreqs------查找python项目依赖并生成requirement
openstack基于卷快照恢复卷
查看openstack各组件小版本号
Copyright © 2011-2022 走看看