使用javascript获取当前网页中的rss/atom链接地址 Access to the use of javascript in the current Web page rss / atom link address

2007年03月25日• 追风逐月 • 分类: 技术开发 March 25, 2007 Herd monthly • • Category: Technology Development

PLAIN TEXT PLAIN TEXT

JavaScript: JavaScript:

  1. function getFeedUrl ( ) Function getFeedUrl ()

  2. { (

  3. links=document. getElementsByTagName ( “link” ) = Document links. GetElementsByTagName (the "link")

  4. for ( i in links ) { For (i in links) (

  5. link=links [ i ] ; Link = links [i];

  6. if ( link. type ) If (link. type)

  7. { (

  8. if ( ( link. type . toLowerCase ( ) == “application/rss xml” ) || If ((link. type. ToLowerCase () == "application / rss xml") | |

  9. ( link. type . toLowerCase ( ) == “application/atom xml” ) ) (Link. type. ToLowerCase () == "application / atom xml"))

  10. { (

  11. return link. href ; Return link. Href;

  12. } )

  13. } )

  14. } )

  15. } )

标签: javascript Tags: javascript
本文链接: http://chyni.com/develop/javascript-rss.html This paper links: http://chyni.com/develop/javascript-rss.html

你可能还喜欢 You may also like



发表你的意见 Express your views

追风逐月 Zhuifeng monthly

提供网络赚钱、网赚经验、网赚工具、SEO、国外主机信息 The provision of the network to make money, Wangzhuan experience Wangzhuan tool, SEO, foreign host information
Herd monthly subscription blog feed
Subscribe to google Subscribe to Battery
Subscribe to the fresh fruit Subscribe to grasp shrimp
* 更多订阅本站方式请看订阅帮助 * See More Subscribe way to help subscribers