gpt4 book ai didi

javascript - 为什么我在使用 ceebox 显示 YouTube 视频时收到 "unable to get value of the property ' SetReturnValue'"

转载 作者:行者123 更新时间:2023-12-02 19:25:47 25 4
gpt4 key购买 nike

我有一个 ASP.Net MVC 站点正在使用 CEEBOX在弹出窗口中显示 YouTube 视频。

当视频窗口弹出时,我在 IE9 中遇到以下异常:

Line: 1 Error: Unable to get value of the property 'SetReturnValue': object is null or undefined

如果我尝试使用调试器,我可以看到异常发生在如下所示的部分{格式是我的}:

try {
document.getElementById("")
.SetReturnValue(__flash__toXML(document.location.href.toString()));
}
catch (e) {
document.getElementById("").SetReturnValue("<undefined/>");
}

触发弹出窗口的 anchor 的标记是:

<a class="thickbox" rel="width:640 height:385" 
href="http://www.youtube.com/watch?v=xxxxxxxxx" >
<span style="background-color: White; position: relative; outline-style: none; ">
<span class="cliplarge" >
<img src="http://zzz.zzz.com/xxxx.jpg"
style="height: 275px; width: 418px; margin-bottom: 0px; margin-top: -35px; "
alt="Test" title="" />
</span>
<div style="z-index:40;position:relative;height:100px;width:100px;top:-140px;left:140px;">
<img src="<%: Url.Content("~/Content/VideoPlay.png") %>" />
</div>
</span>
</a>

最佳答案

问题原来与 URL 的形式有关:

网址格式为:http://www.youtube.com/watch?v=xxxxxx旨在直接显示在 YouTube 网站上。

而 URL 的形式为:http://www.youtube.com/v/xxxxxx导致使用全屏播放器,该播放器将在任何框架中显示...如果将其放入浏览器 URL 中,它将占据浏览器窗口的全屏。

第二种形式似乎更适合弹出窗口,并且不会出现异常。

关于javascript - 为什么我在使用 ceebox 显示 YouTube 视频时收到 "unable to get value of the property ' SetReturnValue'",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12068788/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com