在 iframe 中获取 css 个 Visio SharePoint WebPart
Get css of Visio SharePoint WebPart within an iframe
某些 Microsoft Visio 必须在 SharePoint Online 中显示,唯一的选择是将其嵌入 SharePoint 内的 Iframe WebPart。
唯一奇怪的是删除了 Visio 的底部菜单,并且 iframe 中有许多嵌套 css - 我们没有找到删除 Visio 菜单的动态方法 - 任何指针将不胜感激。
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script>
var iframe = document.getElementById("Iframe");
iframe.onload = function(){
$("#Iframe").contents().find(".mypage-header2").hide();
}
</script>
无法使用 javascript/jQuery 执行此操作,因为出于安全原因,运行 Visio 的域和运行代码的域不同。您可能要考虑使用 API Application.showToolbars
来控制工具栏。
某些 Microsoft Visio 必须在 SharePoint Online 中显示,唯一的选择是将其嵌入 SharePoint 内的 Iframe WebPart。
唯一奇怪的是删除了 Visio 的底部菜单,并且 iframe 中有许多嵌套 css - 我们没有找到删除 Visio 菜单的动态方法 - 任何指针将不胜感激。
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script>
var iframe = document.getElementById("Iframe");
iframe.onload = function(){
$("#Iframe").contents().find(".mypage-header2").hide();
}
</script>
无法使用 javascript/jQuery 执行此操作,因为出于安全原因,运行 Visio 的域和运行代码的域不同。您可能要考虑使用 API Application.showToolbars
来控制工具栏。