登录

javascript - 如何用js对xml 时间排序?

<item>
  <title>
    <![CDATA[云南网携]]>
  </title>
  <source>云南网</source>
  <author>3</author>
  <pubDate>25-08-2016 10:49:01 GMT</pubDate>
  <link>
    <a href=""/>
  </link>
</item>
<item>
  <title>
    <![CDATA[桂园向马碧]]>
  </title>
  <source>云南网</source>
  <author>1</author>
  <pubDate>22-08-2016 11:49:01 GMT</pubDate>
  <link>
    <a href=""/>
  </link>
</item>
<item>
  <title>
    <![CDATA[希望小学献爱心]]>
  </title>
  <source>云南网</source>
  <author>2</author>
  <pubDate>26-08-2016 10:49:01 GMT</pubDate>
  <link>
    <a href=""/>
  </link>
</item>

如何对上述xml文件用js对<pubDate>里的时间对<item>按最新时间进行排序?谢谢!

# JavaScript
天蓬老师天蓬老师2146 天前385 次浏览

全部回复(0) 我要回复

暂无回复
  • 取消回复发送