Home  >  Q&A  >  body text

javascript - iframe有什么方法绕过'X-Frame-Options' to 'DENY'吗 ?

<html>
<head>
<style>
body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;overflow: hidden;}
</style>
</head>
<body>
<iframe src="https://www.zhihu.com/question/56559215/answer/150011133" width='100%' height='100%' frameborder='0' name="_blank" id="_blank" ></iframe>
<p>
</p>
</body>
</html>


因为用iframe嵌入别人的网页还是有很多其他的问题,那么有其他方式实现把别人的网页嵌入到自己的网页里面去吗?

PHP中文网PHP中文网2749 days ago1114

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-04-11 12:29:54

    跳转吧~

    <httpProtocol>
      <customHeaders>
        <add name="X-Frame-Options" value="DENY" />
      </customHeaders>
    </httpProtocol>

    同域都不能用frame, 更何况你的不同域呢...

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-11 12:29:54

    写个代理程序过滤。

    话说别人都不让 iframe 了,你还非得弄进来,这样不好。

    reply
    0
  • Cancelreply