[英]How to open save dialog box instead of file getting opened in browser for my Sharepoint site
[英]How do I create a dialog box that opens a website within itself while staying on my SharePoint site in the background?
我一直在使用SharePoint Online,并且已经对此问题进行了一些研究,但是我无法弄清楚,因此我正在考虑从头开始重新创建SP网站的特定部分。
我正在创建一个东西表,并将指向参考资料的链接放在侧面,但是我需要创建一个对话框或iFrame,以在框内显示参考资料的网站,同时将其保留在后台的同一SP网站上。 有点像-> http://demos.jquerymobile.com/1.4.0/popup-iframe/
该演示具有加载的视频和地图,但是我希望在盒子中加载整个网站。
<!DOCTYPE html>
<html>
<head>
<style>
body {font-family: "Lato", sans-serif;}
/* Spacer for template*/
td.spacer {
margin-left: 100px
}
/* Style the tab */
div.tab {
overflow: hidden;
border: 1px solid #ccc;
background-color: #f1f1f1;
}
/* Style the buttons inside the tab */
div.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
font-size: 17px;
}
/* Change background color of buttons on hover */
div.tab button:hover {
background-color: #ddd;
}
/* Create an active/current tablink class */
div.tab button.active {
background-color: #ccc;
}
/* Style the tab content */
.tabcontent {
display: none;
padding: 6px 12px;
border: 1px solid #ccc;
border-top: none;
}
</style>
</head>
<body>
<div class="tab">
<button class="tablinks" onclick="openLink(event, 'Tab1')">Tab1</button>
<button class="tablinks" onclick="openLink(event, 'Tab2')">Tab2</button>
</div>
<div id="Systems Design" class="tabcontent">
<table style="width:50%">
<th> Description </th>
<th> Link </th>
<tr>
<td>Desc1</td>
<td style="width:25%"> <a href = "https://www.google.com">Click
Here</a></td>
</tr>
<tr>
<td>Desc2 </td>
<td> <a href = "https://www.google.com">Click Here</a></td>
</tr>
</div>
</body>
</html>
iframe可能很挑剔。 许多网站只允许源相同的请求,这意味着iframe不会在不是其自身的域上呈现为资源。 此外,安全性必须匹配,即http
站点无法加载https
iframe。 一种解决方法是在弹出窗口中使用img
标签和网站的屏幕截图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.