Share Point Online 弹出窗口(2023)

问题描述 投票:0回答:1

我是 SharePoint 新手,需要帮助创建单击按钮后打开的弹出窗口。 (我必须在弹出窗口中向我的同事显示一些公告)

我在浏览器中使用最新版本的 SharePoint,有人可以帮助我吗? (/如果没有像 Power Popups 这样的应用程序,这是否可能)

谢谢!

我在 Microsoft 网站上进行了搜索,并在 Microsoft 支持上阅读了许多有关该主题的票证。我也通过 YouTube 告知了自己,但我还没有找到有帮助的答案。

office365 sharepoint-online
1个回答
0
投票

根据我的研究和测试,您可以按照以下步骤在 SharePoint Online 中创建模式对话框弹出:

1.创建一个新的Wiki页面。

2.单击插入 ->> Web 部件 ->> 媒体和内容 ->> 脚本编辑器 ->> 单击添加

3.单击“编辑 Web 部件”->> 单击“编辑片段”

4.输入附件中的代码,然后点击插入并确定。

<button onclick="showModalPopUp();" type="button">Click me​</button>
<script language="javascript" type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>  
<script language="javascript" type="text/javascript">  

    function showModalPopUp() {  
        //Set options for Modal PopUp  
        var options = {  
            url: '/sites/xxx/Lists/List_test2', //Set the url of the page  
            title: 'SharePoint Modal Pop Up', //Set the title for the pop up  
            allowMaximize: false,  
            showClose: true,  
            width: 600,  
            height: 400  
        };  
        //Invoke the modal dialog by passing in the options array variable  
        SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);  
        return false;  
    }  
</script>  

输出:

© www.soinside.com 2019 - 2024. All rights reserved.