删除项目后如何只刷新同一页面? [英] How to just refresh the same page after deleting an item?
问题描述
有一个查看页面(自定义表格),其中显示了许多项目.从该审阅页面删除任何项目后,它将转到项目仪表板页面.如何将其重定向到同一页面(即,它应该仅在删除 项).
There is a review page(custom form) which displays a number of items. When any item is deleted from this review page, it goes to the project dashboard page. How to redirect it to the same page(i.e it should just refresh the review page after deleting an item).
感谢您的帮助.谢谢.
致谢
Sravya
推荐答案
Sravya,
Hi Sravya,
要实现此目的,我们可以使用脚本编辑器" Web部件,用于在页面中插入HTML或JavaScript代码,并使用Web前端技术隐藏原始的删除"内容.按钮并添加我们的自定义删除"按钮.
To achieve this, we can use "Script Editor" Web part to insert HTML or JavaScript code in the page and use Web front-end technology to hide the original "Delete" button and add our custom "Delete" button.
然后,我们可以使用JSOM或REST API,通过点击我们的自定义删除"按钮来删除该项目.按钮并刷新当前页面.
Then we can use JSOM or REST API to delete the item by clicking our custom "Delete" button and refresh the current page.
有关JSOM的更多信息,我们可以参考:
More information about JSOM, we can refer to:
有关REST API的更多信息,我们可以参考:
More information about REST API, we can refer to:
最诚挚的问候,
刘李
这篇关于删除项目后如何只刷新同一页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!