84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <div id="box2">box2</div> <div id="box1">box1</div> </body> </html>
id的属性在一个页面中不是唯一的吗?这里怎么定义了两个Id?
好好学习,天天向上!!!
About the id attribute of html? -PHP Chinese website Q&A-About the id attribute of html? -PHP Chinese website Q&A
Please watch and learn.
id的属性是唯一的,这里面定义了两个不同的id,每个id的属性都是唯一的,且只能用一次。
不是说id不能定义多次,而是id的属性值必须唯一
<div id="box1">1</div> <div id="box1">2</div>
这样就是错的。
About the id attribute of html? -PHP Chinese website Q&A-About the id attribute of html? -PHP Chinese website Q&A
Please watch and learn.
id的属性是唯一的,这里面定义了两个不同的id,每个id的属性都是唯一的,且只能用一次。
不是说id不能定义多次,而是id的属性值必须唯一
这样就是错的。