javascript - How to fetch id of video from embed code -


i have 2 div want fetch video id embed tag of(div id="main)) through javascript.after want replace id embed code of (div container)

 <div id ="container">        <object width="550" height="550">           <param value="http://www.youtube.com/v/sifypqjyhv8&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1" name="movie">          <param value="transparent" name="wmode">          <embed width="550" height="550" wmode="transparent" type="application/x-shockwave-flash" src="http://www.youtube.com/v/sifypqjyhv8&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1">        </object> < /div>  <div id="main"> <a id="displaytext"> <object width="150" height="150">  <param value="http://www.youtube.com/v/sifypqjyhv8&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1" name="movie">   <param value="transparent" name="wmode">  <embed width="150" height="150" wmode="transparent" type="application/x-shockwave-flash" src="http://www.youtube.com/v/sifypqjyhv8&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1"></object>   </a>   </div> 

actually have 5 video in <div id="main"> when click on viedo should play <div id ="container">

please shall thankful shalu

try:

x = document.getelementbytag('div');

if (x.id == 'main')

{

do whatever

}

ok...

x = document.getelementbytag('param')

if (x.name=='movie')

{

name = x.value; 

}


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -