dom里如何知道哪个属性是ID?

bjzhanghao 2003-09-09 12:24:06
我想用Element getElementById(String elementId)这个方法,但不知道
是根据哪个属性来取的,总是返回空值。
...全文
104 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
bjzhanghao 2003-09-09
  • 打赏
  • 举报
回复
是呀,我看过这段话,但我要怎样告诉DOM哪个属性是ID呢?
sgdb 2003-09-09
  • 打赏
  • 举报
回复
The DOM implementation must have information that says which attributes are of type ID. Attributes with the name "ID" are not of type ID unless so defined. Implementations that do not know whether attributes are of type ID or not are expected to return null.

67,549

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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