我必须将Eval("link")
转换为iframe标记。这eval("link ")
意味着在视频库上传最近的视频,我只是想表明在iframe中最近的项目:如何将动态url传递到iframe?
<iframe title="YouTube video player" width="525" height="325" src='<%# Eval("link") %>' frameborder="0" ></iframe>
它不工作的罚款这里是我的代码:
function OpenDialog() {
var options = {
url: '/Shared%20Documents/Forms/AllItems.aspx',
title:Test modal dialogue,
width: 1100,
height: 600,
left: 50,
top: 50,
status: 0,
toolbar: 0,
menubar: 0,
resizable: 1,
dialogReturnValueCallback: CloseCallback
};
SP.UI.ModalDialog.showModalDialog(options);
SP.UI.Modal.OpenPopUpPage('Home.aspx', CloseCallback, 1100, 600);
}
function autoPlayVideo(vcode, width, height) {
"use strict"; $("#videoContainer").html('<iframe width="' + width + '" height="' + height + '" src="https://www.youtube.com/embed/' + vcode + '?autoplay=1&loop=1&rel=0&wmode=transparent" frameborder="0" allowfullscreen wmode="transparent"></iframe>');
}
jQuery('a.introVid').click(function() { autoPlayVideo('Eval("link")', '450', '350'); });
function CloseCallback(result, returnValue) {
alert('Result from dialog was: ' + result);
if (result == SP.UI.DialogResult.Ok) {
alert('You clicked Ok');
}
else if (result == SP.UI.DialogResult.cancel) {
alert('You clicked Cancel');
}
}
什么是“链接”?它来自服务器吗? –
您可以发布您的ASP代码生成的HTML。我猜测'Eval(“link”)'没有返回一个值。 –
Eval(“链接”)应该从资产库返回值... – user1328195