关于document.all.item()
来源:互联网 发布:人工智能芯片股票 编辑:程序博客网 时间:2024/05/16 18:38
1、 document.all.item()是通过元素的name和id来得到名字;
<input type="button" name="button1">
document.all.item("button01") 可以得到该button按钮
2、document.all.button1和document.all.item("button01") 的作用一样
区别是如果元素的name值是数字的话,如
<input type="button" name="123">那么document.all.123会报错,而document.all.item("123")就可以了
运行效果都是:INPUT
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
function test()
{
document.write(document.all.item("text1").nodeName);
document.write(document.all.item("t1").nodeName);
}
</script>
</head>
<body>
<input type="text" name="text1" id="t1">
<input type="button" value="button" onclick="test()"/>
</body>
</html>
- 关于document.all.item()
- 关于document.all.item()
- document.all.item作用
- document.all.item的解释
- 使用document.all.item定位Html元素
- document.all.item().style.display的意思
- document.all.item通过控件的名字定位控件,
- 关于firefox(火狐浏览器)document.all和document.layers
- 关于firefox(火狐浏览器)document.all和document.layers .
- document.all[]
- document.all
- document.all
- document.all
- document.all()
- document.all
- document.all
- document.all
- document.all
- 网上问问题的技巧
- mysql data文件夹下的ibdata1 文件作用
- JMS学习笔记5
- PHP内核介绍及扩展开发指南—类和对象
- coding style for the linux kernel
- 关于document.all.item()
- ubuntu10.04下安装oracle10g
- Hadoop项目
- 利用jsp生成excel格式文件
- windows 开始命令大全
- iphone 的观察者模式
- Hibernate里面如何用Criteria 查询记录数
- org.w3c.dom.Document对象与字符串互转
- foreach vs List<T>.Foreach