kir*_*13y 5 html embed iframe jquery slack
我无法在HTML网站上嵌入松弛的Feed.当我尝试使用iframe时,它只显示为白框.我尝试过使用jquery
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"> .
</script>
<script>
$("#testLoad").load("http://www.SlackURLHere");
</script>
</head>
<body>
<div id="testLoad"></div>
<iframe src="http://www.SlackURLHere"></iframe>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我在iframe和jquery上尝试过"http"和"https"但没有运气.:(所以,如果你有任何其他方法,请分享!
谢谢
小智 7
刚试过这个,看起来它不会显示的原因是因为slack.com设置的X-Frame-Options标题是SAMEORIGIN.换句话说,您只能在slack.com上嵌入该页面,而不是其他任何地方.