开发者

Using same name for id and classname of an element?

开发者 https://www.devze.com 2023-01-01 13:58 出处:网络
I have some s in my webpage, is th开发者_如何学JAVAere anything wrong with sometimes using the same name as the classname and id? Something like:

I have some s in my webpage, is th开发者_如何学JAVAere anything wrong with sometimes using the same name as the classname and id? Something like:

<div id='foo' class='foo'>hello</div>

just wondering -

Thanks


Using identical IDs and class names will not give you any problems as long as the id attribute is unique.

0

精彩评论

暂无评论...
验证码 换一张
取 消