这是我的剑道弹出脚本,它工作得很好。但我想对它做一点小改动。<!DOCTYPE html><html><head> <title></title> <link rel="stylesheet" href="styles/kendo.common.min.css" /> <link rel="stylesheet" href="styles/kendo.default.min.css" /> <link rel="stylesheet" href="styles/kendo.default.mobile.min.css" /> <script src="js/jquery.min.js"></script> <script src="js/kendo.all.min.js"></script></head><body><div id="example"> <div id="dialog"> </div> <span id="undo" style="display:none" class="k-button hide-on-narrow">Click here to open the dialog</span></div><script> $(document).ready(function () { var dialog = $('#dialog'), undo = $("#undo"); undo.click(function () { dialog.data("kendoDialog").open(); undo.fadeOut(); }); function onClose() { undo.fadeIn(); } dialog.kendoDialog({ width: "450px", title: "Software Update", closable: false, modal: false, content: "<p>A new version of <strong>Kendo UI</strong> is available. Would you like to download and install it now?<p>", actions: [ { text: 'Skip this version' }, { text: 'Remind me later' }, { text: 'Install update', primary: true } ], close: onClose }); });</script><style> #example { min-height: 350px; }</style></body></html>正如您在脚本中看到的那样,有一部分说内容:"<p>A new version of <strong>Kendo UI</strong> is available. Would you like to download and install it now?<p>",我不想在这里有一个修复文本,我想加载一个名为 Terms.html 的 HTML 文件的内容。感谢你的帮助。
1 回答

饮歌长啸
TA贡献1951条经验 获得超3个赞
您可以通过url以下方式完成content:
dialog.kendoDialog({
width: "450px",
title: "Software Update",
closable: false,
modal: false,
content : {
url: "Terms.html"
},
actions: [
{ text: 'Skip this version' },
{ text: 'Remind me later' },
{ text: 'Install update', primary: true }
],
close: onClose
});
添加回答
举报
0/150
提交
取消