class is used for CSS, which is the name of that style; id is used for Javascript, to identify the object in scripts.

bloor (bloor)
2001-3-28 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 那位大侠能给我讲讲CSS里class=和id=的区别?我看了一些书,发现他们都没有讲明白,从举的例子看两者可以通用,对吗?

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论