我的代码在这里:
function cbfunca(datas){
var videoRefs =(datas.value.items [0] .content);
var frames ='http://www.youtube
?nocookie.com/v / '+ videoRefs +' 版本= 3及HL = EN_GB&安培;相对= 0 \“
type = \“application / x-shockwave-flash \”width = \“560 \”
高度= \ “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);
}
视频应该在这里,如果你看到这个,你做错了什么
第一个总是不出现?我怎么能解决这个问题?对不起,代码似乎没有出现在这里。
答案 0 :(得分:1)
来自您的链接的代码(它确实在网页上显示2个视频);在第二个iframe网址上添加“/ 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>