zoukankan
html css js c++ java
历遍JavaScript对象
<
HTML
><
HEAD
>
<
TITLE
></
TITLE
>
<
META
NAME
="GENERATOR"
Content
="Microsoft Visual Studio"
>
<
META
HTTP-EQUIV
="Content-Type"
content
="text/html; charset=UTF-8"
>
<
script
language
=javascript
>
function
displayObject()
{
var
t
=
document.forms[
0
].Text1;
var
s
=
"
<center><b>历遍<font color=#ff0000>
"
+
t.value
+
"
</font>对象</b><br>
"
;
for
(
var
o
in
eval(t.value))
{
s
+=
"
<font color=#0000ff>
"
+
o
+
"
</font><br>
"
;
}
document.write(s
+
"
</center>
"
);
}
</
script
>
</
HEAD
>
<
BODY
>
<
center
><
font
color
=#0000ff
>
请输入对象名称
</
font
>
<
form
>
<
input
id
=Text1
name
=Text1
type
=text
>
<
br
>
<
input
id
=Button1
name
=Button1
type
=button
value
=历遍对象
onclick
="displayObject()"
>
</
form
></
center
>
</
BODY
></
HTML
>
查看全文
相关阅读:
通向全栈之路——(4)nginx反向代理配置
通向全栈之路——(3)node环境搭建
通向全栈之路——(2)服务器安全设置
通向全栈之路——(1)服务器新增用户及授权
window.location.href跳转至空白页
webpack 1.x 学习总结
win7下使用apache ab 比较测试node与 tomcat
Enum,Int,String的互相转换
读写appSettings配置节方法
SC命令
原文地址:https://www.cnblogs.com/ghx88/p/370908.html
最新文章
python生成器 获取 目录下文件
Linux anaconda 内网 安装 卸载
Ubuntu postgres 内网 安装 卸载
CentOS 7 Redis 内网 安装 卸载
Lombok插件的安装
Mysql 计算精度维度
Centos下Jenkins 服务的部署安装
Centos 下安装 lrzsz上传下载工具
Centos下更新yum软件管理器下载来源
Gdb调试工具/ Makfile项目管理
热门文章
Linux文件的I/O操作
GCC the GNU
Windows 编译 MQTT C++ Client
c++11简单的线程
一个汇编的HelloWorld!
第4章
.C#认证考试试题汇编:第一单元:1,11 第二单元:1,11
.Net深入体验与实践第一章
高频dom操作和页面性能优化(转载)
通向全栈之路——(5)git通三端
Copyright © 2011-2022 走看看