可以有两个或更多具有相同id选择器值的元素 [英] Can there be two or more elements that have the same id selector value

查看:130
本文介绍了可以有两个或更多具有相同id选择器值的元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello

在HTML中,是否有两个或更多具有相同ID选择器值的元素

In HTML, Can there be two or more elements that have the same id selector value

问候

Manoj Gokhale

Manoj Gokhale

推荐答案

你好朋友

欢迎来到MSDN论坛。

据我所知。它不能。
元素ID在整个文档。

"文档中不得有多个具有相同id值的元素。"取自:

https://www.w3.org/ TR / 2012 / WD-html-markup-20121025 / global-attributes.html#common.attrs.id

"There must not be multiple elements in a document that have the same id value." Taken from : https://www.w3.org/TR/2012/WD-html-markup-20121025/global-attributes.html#common.attrs.id

如果你对它很感兴趣。
更多成员在这个类似的主题中讨论过它:

https://stackoverflow.com/questions/5611963/can-multiple-different-html-elements - 具备最相同-ID-IF-更有耐力,不同-eleme

如果它解除阻止,请随时告诉我

真诚

可能


这篇关于可以有两个或更多具有相同id选择器值的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆