![](/img/trans.png)
[英]using loop to check and remove a className from class name string and add another className to the element which triggers the event
[英]Using same name for id and classname of an element?
我的网页中有个,有时使用与类名和ID相同的名称有什么问题吗? 就像是:
<div id='foo' class='foo'>hello</div>
就是想 -
谢谢
只要id
属性是唯一的,使用相同的ID和类名不会给您带来任何问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.