dreamweaver 中会给表单元素自动加上 ID,请问ID有什么用吗?

happymingnan 2003-11-19 03:32:33
dreamweaver 中会给表单元素自动加上 ID,请问ID有什么用吗?
...全文
230 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
happymingnan 2003-11-19
  • 打赏
  • 举报
回复
那我怎么获得一个表单里面的 所有ID值啊?应该和获得name值有说不同吧?
「已注销」 2003-11-19
  • 打赏
  • 举报
回复
Id:
In versions earlier than Microsoft® Internet Explorer 5, this property is read-only.

The id should be unique throughout the scope of the current document. If a document contains more than one object with the same identifier, the objects are exposed as a collection that can be referenced only in ordinal position.


Name:
When submitting a form, use the name property to bind the value of the control. The name is not the value displayed for the input type=button, input type=reset, and input type=submit input types. The internally stored value, not the displayed value, is the one submitted with the form.
DeltaCat 2003-11-19
  • 打赏
  • 举报
回复
ID用处大了

可以全页面定位啊
你没看到DW中的 getElementsByID?
飞一龙 2003-11-19
  • 打赏
  • 举报
回复
用法一般有两种:一种是作为css认识id
二种是作为脚本引用认识id
hyllp 2003-11-19
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/2429/2429052.xml?temp=.4869043

28,407

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧