iframe 相关问题

“iframe”是一个HTML元素,它在文档中创建“内嵌框架”,允许在同一页面中显示单独的文档。

iframe 上的 webix postMessage 永远不会到达嵌入的drawio

基本上,后端为我提供了drawio文件的内容(所以我们正在谈论xml模式),我需要在我们的webix页面中显示它。 到目前为止,我已经尝试使用 iframe 来实现这一点,

回答 1 投票 0

Laravel 5.1 iframe 中的 CSRF,如何使其工作?

我的应用程序有一个插件,用户可以在包含表单的网站中实现该插件。问题是提交表单时出现 TokenMismatchException。根据我所做的研究,我...

回答 4 投票 0

iFrame 嵌入(用于 Youtube 视频)未出现在 Safari 中

我的 Youtube 嵌入内容出现在 Chrome 和 Firefox 中,但不会出现在 Safari(包括 iPhone 上的移动 Safari)中。我使用 Vimeo 或原生 HTML5 视频得到相同的结果 - 没有任何迹象......

回答 3 投票 0

html页面中的代理

我有一个网页,其中有另一个网页 我的代码 我想在 iframe 中打开网页

回答 2 投票 0

嵌入 iFrame 时 Google Apps 脚本不会加载

我正在尝试将我的 Google Apps 脚本 Web 应用程序嵌入到另一个域上的 iFrame 中,但该 Web 应用程序未加载,我只看到一个白屏。 webinspector 中也没有错误。 网络应用程序...

回答 2 投票 0

根据 iframe 中的内容调整容器高度

我正在尝试弄清楚如何根据内容动态调整 iframe 高度。我不想在移动设备上看到 iframe 的滚动行为,这对用户体验不太友好。 我试过设置100...

回答 1 投票 0

使用 Chrome 开发者工具调试 iframe

我想使用 Chrome 开发者控制台查看应用程序中的变量和 DOM 元素,但该应用程序存在于 iframe 内(因为它是 OpenSocial 应用程序)。 所以情况是: 我想使用 Chrome 开发者控制台查看应用程序中的变量和 DOM 元素,但该应用程序存在于 iframe 中(因为它是 OpenSocial 应用程序)。 所以情况是: <containing site> <iframe id='foo' src='different domain'> ... my app ... </iframe> </containing site> 有什么方法可以从开发者控制台访问iframe中发生的事情吗?如果我尝试执行 document.getElementById("foo").something,它不起作用,可能是因为 iframe 位于不同的域中。 我无法在新选项卡中打开 iframe 内容,因为 iframe 也需要能够与包含的网站进行通信。 在 Chrome 的开发者工具中,顶部有一个栏,称为 Execution Context Selector(向 felipe-sabino 致敬),位于 Elements 选项卡下方,该栏根据当前选项卡的上下文而变化。在“控制台”选项卡中时,该栏中有一个下拉列表,允许您选择控制台将在其中运行的框架上下文。在此下拉列表中选择您的框架,您将发现自己处于适当的框架上下文中。 :D Chrome v59 Chrome v33 Chrome v32 及更低版本 目前控制台中的评估是在页面主框架的上下文中执行的,并且它遵循与主框架本身相同的跨域策略。这意味着除非主框架可以访问 iframe 中的元素,否则您无法访问。不过,您仍然可以使用脚本面板设置断点并调试代码。 更新:这不再是事实。请参阅Metagrapher 的回答。 当 iFrame 像这样指向您的网站时: <html> <head> <script type="text/javascript" src="/jquery.js"></script> </head> <body> <iframe id="my_frame" src="/wherev"></iframe> </body> </html> 你可以通过这种东西访问iFrame DOM。 var iframeBody = $(window.my_frame.document.getElementsByTagName("body")[0]); iframeBody.append($("<h1/>").html("Hello world!")); 在我相当复杂的场景中,关于如何在 Chrome 中执行此操作的公认答案对我来说不起作用。您可能想尝试使用 Firefox 调试器(Firefox 开发人员工具的一部分),它显示所有“源”,包括那些属于 iFrame 的部分

回答 4 投票 0

通过 OneDrive 嵌入 Excel:预览正确,但最终结果不正确

我嵌入了一个 Excel 文件(<2Mb) to my website using the following code generated using OneDrive. <question vote="0"> <p>我嵌入了一个 Excel 文件(<2Mb) to my website using the following code generated using OneDrive.</p> <pre><code>&lt;iframe width=&#34;1150&#34; height=&#34;1300&#34; frameborder=&#34;0&#34; scrolling=&#34;no&#34; src=&#34;https://1drv.ms/x/c/8d06bfc014a24e6f/IQMWRn035ZjpSYXJqNaciXhFAfXO7kfIhooSmKGnNnu0xbo?AllowTyping=True&amp;wdHideGridlines=True&amp;wdHideHeaders=True&amp;wdInConfigurator=True&amp;wdInConfigurator=True&#34;&gt;&lt;/iframe&gt; </code></pre> <p>如您所见,允许用户在单元格中输入的选项已激活。</p> <p>令人惊讶的是,OneDrive 中的预览效果符合预期,但结果却不尽如人意。嵌入后,<a href="https://www.smartdataproducts.com/home-5144-6665" rel="nofollow noreferrer">集成表对我更改蓝色单元格的尝试没有响应。</a> </p>此外,如果您单击“查看完整文档”按钮(右下角),它将作为仅供查看的文档打开,不允许进行任何编辑。这让我不太担心,但我需要用户能够更改蓝色单元格。<p> </p> </question> <answer tick="false" vote="0">我和你有同样的问题,我尝试修改访问参数中的权限,但它没有改变任何东西。<p> </p> </answer></body>

回答 0 投票 0

我可以为 iFrame 编写一个 HTML 来识别其父级是否使用深色模式吗?

我在一所在线大学工作,该大学使用由我们较大的母公司开发的专有学习管理系统。我们希望能够创建可嵌入的 HTML 块来添加一些样式......

回答 1 投票 0

100vh 在 Safari iOS“单选项卡”配置上无法正常工作

我使用 Angular 将 iframe 加载到 html 中。 在我的 ts 上我有 ngOnInit(): 无效...

回答 1 投票 0

检索postMessage事件的完整原始URL

我正在设置一个通过 iFrame 嵌入不同内容的页面。父站点和 iFrame 内容都通过 Window.postMessage() API 进行通信。然后我在父网站上听...

回答 1 投票 0

如何使用带有 Playwright 的 query_selector_all 获取 iframe 中的文本

我想使用 Playwright 和 Python 从网页上的 iframe 获取文本数据。由于iframe中的数据,当我尝试直接使用page.query_selector_all时它不起作用。 例如,下面的作品...

回答 1 投票 0

如何通过索引选择 Playwright (python) 中 iFrame 中包含的按钮?

我正在尝试使用Python和Playwright在iframe中选择一个按钮...在Selenium中我知道你可以通过使用索引来做到这一点,这在playwright中是否可能,我一直在挖掘...

回答 1 投票 0

Vimeo 嵌入不跟踪

我正在嵌入 Vimeo 视频,但是我希望添加他们的“请勿跟踪”功能。 我已经添加了 URL 参数 ?dnt=1 <p>我正在嵌入 Vimeo 视频,但是,我希望添加他们的“请勿跟踪”功能。</p> <p>我已经添加了URL参数</p> <pre><code>?dnt=1 </code></pre> <pre><code> &lt;iframe src=&#34;https://player.vimeo.com/video/12341234123?dnt=1&#34;/&gt; </code></pre> <p>但是,在加载网站时我仍然看到来自 Vimeo 的 cookie。 我做错了什么?</p> </question> <answer tick="false" vote="-1"> <p>引用vimeo:</p> <p>如果您使用的应用程序要求您插入 Vimeo.com URL(例如 <a href="https://vimeo.com/" rel="nofollow noreferrer">https://vimeo.com/</a> 76979871 )而不是我们的嵌入代码,您将无法使用播放器参数来自定义嵌入式播放器.</p> <p>例如,不支持此方法:</p> <p><a href="https://vimeo.com/76979871" rel="nofollow noreferrer">https://vimeo.com/76979871</a>?质量=720p</p> <p>支持:请参阅下面的链接</p> <p><a href="https://help.vimeo.com/hc/en-us/articles/12426260232977-Player-parameters-overview#h_01FNYA7QTNCMWXY3GV2RF8QP5A" rel="nofollow noreferrer">https://help.vimeo.com/hc/en-us/articles/12426260232977-Player-parameters-overview#h_01FNYA7QTNCMWXY3GV2RF8QP5A</a></p> </answer> </body></html>

回答 0 投票 0

如何阻止网站在 iframe 中加载?

最近我尝试在 iframe 中加载 youtube 网站,但我检查它不起作用。我使用了这个简单的代码。 <...

回答 2 投票 0

在这种情况下唯一标识用户的最佳方法?

我将在 iframe 中的网站上运行代码,该代码可能跨域也可能不跨域,并且可能在多个 iframe 中重复。我可能在顶部窗口中运行代码,也可能没有。我想要...

回答 3 投票 0

适合 <iframe> 以正确调整动态 HTML 的大小

看这里: 我只想打开黄色部分,背景中的其余部分是不必要的,我该怎么做? 打开iframe的代码: ... 看这里: 我只想打开黄色部分,背景中的其余部分是不必要的,我该怎么做? 打开iframe的代码: <div class="col-12 mb-3"> <a class="nav-link text-white" href="javascript:void(0);" onclick="openModal('emailVerification', '../pages/email-verification.html')"> <button id="verifyEmailButton" type="button" class="btn btn-success" style="width: 300px;">Bekräfta din e-post</button> </a> </div> <div class="modal fade" id="emailVerificationModal" tabindex="-1" role="dialog" aria-labelledby="emailVerificationModalLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-scrollable modal-xl" role="document"> <div class="modal-content border-0"> <button style="background-color: #2e4873; color: white;;" type="button" class="btn btn-info close small-close-btn" aria-label="Close" data-dismiss="modal" onclick="closeEmailVerificationModal()">&times;</button> <br> </button> <div class="modal-body"> <iframe id="emailVerificationIframe" src="" frameborder="2" style="width: 100%; height: 80vh;"></iframe> </div> </div> </div> </div> & 带有 iframe 内容的 HTML: <div class="main"> <div class="div-1"> <div class="div-2"> <img src="../social/icons/mail.png" width="70px" /> <h3>Verifiera din e-post adress</h3> <p id="ppp"> Du är nästan där! Vi har skickat ett mail till: <span style="font-weight: bold;" class="d-sm-inline d-none" id="userID"><span id="userName"></span></span> </p> <p> Klicka bara på länken i det e-postmeddelandet för att slutföra din registrering. Om du inte set det, kan du behöva <span id="bold">kolla din skräppost.</span </p> </div> <p id="message"></p> <div class="buttondiv"> <button style="background-color: #2e4873;" type="button" class="btn btn-info"onClick="resend()">Skicka igen</button> <button style="background-color: #2e4873;" type="button" class="btn btn-info" onClick="reload()">Bekräfta</button> </div> <div id="info-message" class="alert alert-success alert-dismissible text-white" role="info" style="display: none;"> <span class="text-sm">Nu har vi skickat verifikationslänken igen.</span> </div> <div id="warning-message" style="display: none;"> <span class="text-sm">Du har inte bekräftat din e-post adress än.</span> </div> <div id="success-message" style="display: none;"> <span class="text-sm">Din e-post adress är nu bekräftad.</span> </div> </div> </div> 我有多个这样制作的模态,确实需要调整它们的大小。 这是一个如何使用具有透明背景的对话框的简单示例 您可以在这里找到文档:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog const dialog = document.querySelector("dialog"); const showButton = document.querySelector("dialog + button"); const closeButton = document.querySelector("dialog button"); // Le bouton "Afficher la fenêtre" ouvre le dialogue showButton.addEventListener("click", () => { dialog.showModal(); }); // Le bouton "Fermer" ferme le dialogue closeButton.addEventListener("click", () => { dialog.close(); }); ::backdrop { opacity: 0; } <main> <dialog> <p>Hello World</p> <button autofocus>Close</button> </dialog> <button>Show Dialog</button> <p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." Section 1.10.32 du "De Finibus Bonorum et Malorum" de Ciceron (45 av. J.-C.) "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?" Traduction de H. Rackham (1914) "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?" </p> <main>

回答 1 投票 0

如何从 iframe 跨原点内关闭 iframe

我创建了一个页面,最终用户将通过 iframe 使用该页面。 在我创建的页面内有两个按钮“提交”和“拒绝”。单击拒绝按钮后我想关闭...

回答 2 投票 0

Iframe 中的 SharedArrayBuffer

因此,SharedArrayBuffer 最近被限制为跨源隔离页面作为安全修复。 我们有一个依赖于 SharedArrayBuffer 的工具,我通过将其移动到准系统来重新设计它以使其再次工作......

回答 3 投票 0

Office 表单API

我目前有一个功能项目,团队填写服务表单,但这些数据不会进入数据库。我做这个项目是为了让我的日常生活更轻松,因为我将这些数据记录在...

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.