0

This question is specific to blogger, JSfiddle is working fine

I have a jsfiddle , where I can replace url for YouTube.

http://jsfiddle.net/jaisonshereen/q3rmyjvd/14/

jsfiddle when you run you can see its replacing url and showing the replaced video.

<iframe id="ytplayer" src="http://www.youtube.com/embed/Mmlc3gJeBUo" frameborder="0" width="640" height="480" ></iframe>
document.getElementById('ytplayer').src = "http://www.youtube.com/embed/EDk3YnVpQes";

But when I put this code in blogger source mode, urls are not replaced

I want to convert this YouTube video

http://www.youtube.com/embed/Mmlc3gJeBUo

with this YouTube video

http://www.youtube.com/embed/EDk3YnVpQes

This is the blogger post source code

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
    document.getElementById('ytplayer').src = "http://www.youtube.com/embed/EDk3YnVpQes";
  </script>

<iframe id="ytplayer" src="http://www.youtube.com/embed/pXquZBc8td0" frameborder="0" width="640" height="480" ></iframe>

Here is the blog : https://blogs.giftyourhubby.com/2021/08/test.html

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
SmartestVEGA
  • 8,415
  • 26
  • 86
  • 139

0 Answers0