// 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"希望本文所述对大家的javascript程序设计有所帮助。