【发布时间】:2021-09-11 02:58:07
【问题描述】:
我找到了帖子:sharepoint with JQuery - stops working when click on column filter,但无法正常工作。
我想在 SharePoint 列表的单元格中将 HTML 显示为超链接。在有人尝试过滤列表之前,我的代码一直有效——元素刷新以在 SharePoint 列表中显示搜索结果,并且链接恢复为 HTML 代码,而不是可点击的链接。
我无权访问母版页或 SharePoint Designer。我唯一的选择是 OOB Web 部件。
这是我正在使用的代码:
<script src="https://code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
var textholder = "";
$("td.ms-vb2:contains('<a href=')").each(function() {
textholder = $(this).text();
$(this).html(textholder);
});
})
</script>
我可以添加什么来使代码在刷新时工作?我是一个新手,并且希望将解决方案插入代码中,因为我不知道我会在哪里输入命令。谢谢!
【问题讨论】:
标签: jquery sharepoint filter hyperlink sharepoint-2013