我想在日曆頁面的內容編輯器Web部件中添加「添加新事件」鏈接。點擊時應打開默認的「新事件」窗口添加事件。怎麼可以做到這一點?鏈接應該是什麼樣子?Sharepoint 2013在內容編輯器中添加添加新事件鏈接
感謝 Ganesh神
我想在日曆頁面的內容編輯器Web部件中添加「添加新事件」鏈接。點擊時應打開默認的「新事件」窗口添加事件。怎麼可以做到這一點?鏈接應該是什麼樣子?Sharepoint 2013在內容編輯器中添加添加新事件鏈接
感謝 Ganesh神
如果你想打開整個頁面的形式,該鏈接應該是這樣的:
<a href="<weburl>/Lists/<calendarlist>/NewForm.aspx">Add New Event</a>
要在模態對話框打開:
function openDialog() {
var url = "<weburl>/Lists/<calendarlist>/NewForm.aspx";
var options = {
title: "Add New Event",
width: 400,
height: 600,
url: url
};
SP.UI.ModalDialog.showModalDialog(options);
}
<a href="#" onclick="openDialog()">Add New Event</a>
覆蓋<weburl>
與網絡相對URL和<calendarlist>
與列表的相對URL(大部分時間列表名稱) 例子:https://mysiteurl/Lists/Calendar/NewForm.aspx
<a href="webUrl/Lists/Calendar/NewForm.aspx">Add New Event</a>