0

我在这里有代码: function cbfunca(datas){ var videoRefs = (datas.value.items[0].content); var frames = 'http://www.youtube
nocookie.com/v/'+videoRefs+'?version=3&hl=en_GB&rel=0\"
type=\"application/x-shockwave-flash\" width=\"560\ " height=\"349\">'; var curtextvals = document.getElementById("pumps"); curtextvals.innerHTML = (frames); } 视频应该在这里,如果你看到这个,你做错了

_id=f261e19584a4dd5cb0a61386b24e80bf&_render=json&_callback=cbfunca">

这里的第二个代码: function cbfunc(data){ var videoRef = (data.value.items[0].content); var frame = 'http://www.youtube-
nocookie.com/v/'+videoRef+'?version=3&hl=en_GB&rel=0\" type=\"application/x-shockwave- flash\" width=\"560 \" height=\"349\">'; var curtextval = document.getElementById("pump"); curtextval.innerHTML = (frame); } 视频应该在这里,如果你看到这个,你做错了

第一个总是不出现?我该如何解决这个问题?抱歉,这里似乎没有出现代码。

4

1 回答 1

1

您链接中的代码对我有用(它确实在网页上显示了 2 个视频);在第二个 iframe url 上添加“/v/”之后。

<td bgcolor="#FFFFFF" valign="middle" align="center"colspan="2" class="dty"><span class="t">Most Recent Video</span>
<script type="text/javascript">
function cbfunc(data){
var videoRef = (data.value.items[0].content);
var frame = '<iframe class=\"embeddedvideo\" src=\"http://www.youtube-nocookie.com/v/'+videoRef+'?version=3&hl=en_GB&rel=0\" type=\"application/x-shockwave-flash\" width=\"560\" height=\"349\"></iframe>';
var curtextval = document.getElementById("pump");
curtextval.innerHTML = (frame); 
}
</script>
<div id="pump">Video Should Be Here, If you see this, you did something wrong</div>
<p>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_id=35717280d4cd32a61acd1a36f09635c5&_render=json&_callback=cbfunc">
</script>
       </th>







       </tr>    <tr>
       <td bgcolor="#FFFFFF" valign="middle" align="center"colspan="2" class="dty"><span class="t">Most Recent Minecraft Video</span>
<script type="text/javascript">
function cbfunca(datas){
var videoRefs = (datas.value.items[0].content);
var frames = '<iframe class=\"embeddedvideo\" src=\"http://www.youtube-nocookie.com/v/'+videoRefs+'?version=3&hl=en_GB&rel=0\" type=\"application/x-shockwave-flash\" width=\"560\" height=\"349\"></iframe>';
var curtextvals = document.getElementById("pumps");
curtextvals.innerHTML = (frames); 
}
</script>
<div id="pumps">Video Should Be Here, If you see this, you did something wrong</div>
<p>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_id=f261e19584a4dd5cb0a61386b24e80bf&_render=json&_callback=cbfunca">
</script>
于 2013-10-02T07:06:43.097 回答