为了账号安全,请及时绑定邮箱和手机立即绑定

剑道弹出加载html内容

剑道弹出加载html内容

婷婷同学_ 2022-07-21 22:12:44
这是我的剑道弹出脚本,它工作得很好。但我想对它做一点小改动。<!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

        }); 


查看完整回答
反对 回复 2022-07-21
  • 1 回答
  • 0 关注
  • 72 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号