Closed anonymous32767 closed 15 years ago
Вот такой
re=/.?youtube.com\/watch\?v=([\w-]_).*/i; i=-1; while(tab=document.getElementsByTagName('p')[++i]) if(tab.innerHTML.match(re)) { tab.innerHTML=tab.innerHTML.replace(re,'<param name="movie" value="http://www.youtube.com/v/'+"$1"+'"><embed src="http://www.youtube.com/v/'+"$1"+'" type="application/x-shockwave-flash" wmode="transparent" width="320" height="262">'+tab.innerHTML); //tab.innerHTML=tab.innerHTML.replace(re,"$0"); //alert(tab.innerHTML);
}
Вот такой
re=/.?youtube.com\/watch\?v=([\w-]_).*/i; i=-1; while(tab=document.getElementsByTagName('p')[++i]) if(tab.innerHTML.match(re)) { tab.innerHTML=tab.innerHTML.replace(re,'
'+tab.innerHTML); //tab.innerHTML=tab.innerHTML.replace(re,"$0"); //alert(tab.innerHTML);