第一个例子中使用了 date 属性:

<note date="08/08/2008">
<to>George</to>
<from>John</from>
<heading>Reminder</heading>
<body>Don't forget the meeting!</body>
</note>
第二个例子中使用了 date 元素:

<note>
<date>08/08/2008</date>
<to>George</to>
<from>John</from>
<heading>Reminder</heading>
<body>Don't forget the meeting!</body>
</note>
第三个例子中使用了扩展的 date 元素(这是我的最爱):

<note>
<date>
  <day>08</day>
  <month>08</month>
  <year>2008</year>
</date>
<to>George</to>
<from>John</from>
<heading>Reminder</heading>
<body>Don't forget the meeting!</body>
</note>

相关文章:

  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2021-07-01
  • 2022-01-23
  • 2021-09-05
猜你喜欢
  • 2022-12-23
  • 2021-12-21
  • 2021-05-23
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-12-22
相关资源
相似解决方案