// Example link:
// <a id="myLink" href="http://www.youtube.com/watch?v=cyRqR56aCKc&feature=PlayList&p=00000000000&index=0&playnext=1">Youtube link</a>
var youtubeLink = document.getElementById('myLink').href;
var youtubeVideoKey = youtubeLink.substr(youtubeLink.lastIndexOf("v=") + 2, 11);
// youtubeVideoKey will return "cyRqR56aCKc"
太及时了!我刚想自己解决这个问题,它就出现在我的 RSS 订阅里了;谢谢!
我一直在寻找关于这类主题的高质量文章或博客文章。在 Yahoo 上搜索,我最终找到了这个网站。读完这些信息后,我很高兴地说,我感觉自己找到了我需要的东西。我一定会记住这个网站,并定期查看它。