// 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"
Get YouTube Key from a Link
Chris Coyier
on
Amazingly timely! I was just trying to work this out myself when this showed up in my RSS feed; thanks!
I’ve been exploring for a little bit for any high-quality articles or blog posts on this kind of area . Exploring in Yahoo I finally stumbled upon this web site. Reading this information So i’m satisfied to express that I’ve an incredibly excellent uncanny feeling I found out exactly what I needed. I such a lot indisputably will make sure to do not forget this website and give it a glance on a continuing basis.