惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy International News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Jina AI
Jina AI
T
Tailwind CSS Blog
WordPress大学
WordPress大学
Scott Helme
Scott Helme
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - Franky
C
CERT Recently Published Vulnerability Notes
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
雷峰网
雷峰网
Schneier on Security
Schneier on Security
博客园 - 聂微东
T
Tor Project blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
AI
AI
T
Troy Hunt's Blog
Security Latest
Security Latest
T
The Blog of Author Tim Ferriss
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
Check Point Blog
T
Threat Research - Cisco Blogs
W
WeLiveSecurity
V
Vulnerabilities – Threatpost
Recorded Future
Recorded Future
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cisco Talos Blog
Cisco Talos Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Cloudbric
Cloudbric
J
Java Code Geeks
罗磊的独立博客
C
Cyber Attacks, Cyber Crime and Cyber Security
aimingoo的专栏
aimingoo的专栏
L
LangChain Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Privacy & Cybersecurity Law Blog
Google DeepMind News
Google DeepMind News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
Lohrmann on Cybersecurity
I
InfoQ
MongoDB | Blog
MongoDB | Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The GitHub Blog
The GitHub Blog
The Hacker News
The Hacker News
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
N
News and Events Feed by Topic

追剧生活网

前端代替iframe的方法 - 追剧生活网 写领券工具时,遇到的问题 - 追剧生活网 写领券工具时,遇到的问题 - 追剧生活网 实例:php利用cURL传递post数据 - 追剧生活网 实例:php利用cURL传递post数据 - 追剧生活网 “无法启动程序,计算机丢失 MSVCP120.dll”终极解决办法 - 追剧生活网 “无法启动程序,计算机丢失 MSVCP120.dll”终极解决办法 - 追剧生活网 利用jQuery实现绑定按钮变色写法 - 追剧生活网 利用jQuery实现绑定按钮变色写法 - 追剧生活网 今天什么也不做,好好哭一场。 - 追剧生活网 今天什么也不做,好好哭一场。 - 追剧生活网 解决微信播放视频无法全屏 - 追剧生活网 解决微信播放视频无法全屏 - 追剧生活网 2020年,愿你我安康 - 追剧生活网 2020年,愿你我安康 - 追剧生活网 html5的video标签播放m3u8视频 - 追剧生活网 html5的video标签播放m3u8视频 - 追剧生活网
前端代替iframe的方法 - 追剧生活网
mengkun · 2022-09-26 · via 追剧生活网

最近有些get方式请求的api,用ajax访问会提示非同源,所以我变通了一下,用iframe访问。但今天遇到一个api,把它放在iframe里会提示:
Refused to display 'https://xxxx.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

前端代替iframe的方法

意思就是接口限制嵌入页面访问,百度了很多方法,最终找到一个可以用的load(url),这是jq的方法,使用时需要引入jq,示例:

var url = "https://xxx.com/api";
$("#nameid").load(url);

本文作者为隔壁小蒋,转载请注明。