我必須將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