internet-explorer-11 相关问题

Internet Explorer 11(IE11)是Internet Explorer 10的后续版本。它于2013年10月17日针对Windows 8.1和2013年11月7日针对Windows 7正式发布

IE11 XSLT 将 <param> 节点转换为自闭标签而不关闭

这个问题与此非常相关 输出到 DOM 时,XSLT 将 节点转换为 标签 考虑这段代码: <question vote="0"> <p>这个问题与此非常相关 <a href="https://stackoverflow.com/questions/78266294/xslt-converts-image-node-to-img-tag-when-outputiing-to-dom">XSLT 在输出到 DOM 时将 <image> 节点转换为 <img> 标签</a></p> <p>考虑这段代码:</p> <pre><code>&lt;script type=&#34;application/xml&#34; id=&#34;data&#34;&gt; &lt;xsl:copy-of select=&#34;/*&#34; /&gt; &lt;/script&gt; </code></pre> <p>这会将 XML 文档的内容输出到 html 页面中。 然后,可以很容易地通过 javascript 的 DOMParser() 对象解析 XML 中的数据,从而可以在网页上轻松访问这些数据,而无需使用 XSLT 生成网页。</p> <p>需要在脚本标签之间移动 <xsl:copy-of select"/*" />,以防止 XSLT 转换器将 XML 文件中的节点转换为 HTML 中的标签。</p> <p>这工作得很好,直到我发现节点也发生了同样的情况。简单地说:如果 XML 有节点,输出将被破坏且无法解析,如下所示:</p> <p><a href="https://i.stack.imgur.com/Ns44i.png" target="_blank"><img src="https://cdn.txt58.com/i/AWkuc3RhY2suaW1ndXIuY29tL05zNDRpLnBuZw==" alt=""/></a></p> <p>如何防止这种行为?如何阻止浏览器引擎使标签成为自关闭标签?</p> <pre><code>new DOMParser().parseFromString() </code></pre> <p>/\ 不适用于自关闭节点。 (<strong>澄清</strong>:显然 DOMParser 将与自关闭节点一起工作,只是在这种情况下它不是自关闭的,即 - 没有正斜杠)</p> <hr/> <p>好的,这里是重现此内容所需的文件:</p> <p>测试.xslt</p> <pre><code>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt; &lt;xsl:stylesheet xmlns:xsl=&#34;http://www.w3.org/1999/XSL/Transform&#34; version=&#34;1.0&#34;&gt; &lt;xsl:output method=&#34;html&#34; indent=&#34;no&#34; version=&#34;5.0&#34; /&gt; &lt;xsl:template match=&#34;/&#34;&gt; &lt;xsl:text disable-output-escaping=&#39;yes&#39;&gt;&amp;lt;!DOCTYPE html&gt;&lt;/xsl:text&gt; &lt;xsl:apply-templates select=&#34;root&#34; /&gt; &lt;/xsl:template&gt; &lt;xsl:template match=&#34;root&#34;&gt; &lt;html&gt; &lt;head&gt; &lt;script type=&#39;application/xml&#39;&gt; &lt;xsl:copy-of select=&#34;/*&#34; /&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt;qwe&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>测试.xml</p> <pre><code>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt; &lt;?xml-stylesheet type=&#34;text/xsl&#34; href=&#34;test.xslt&#34;?&gt; &lt;root&gt; &lt;object&gt; &lt;text&gt;text&lt;/text&gt; &lt;param name=&#34;name&#34;&gt;&lt;/param&gt; &lt;/object&gt; &lt;/root&gt; </code></pre> <p>在 Internet Explorer 11 兼容模式下使用 Edge 打开 test.xml。 “head”应该包含一个带有扭曲 xml 的脚本。</p> <p><a href="https://i.stack.imgur.com/N6RRV.png" target="_blank"><img src="https://cdn.txt58.com/i/AWkuc3RhY2suaW1ndXIuY29tL042UlJWLnBuZw==" alt=""/></a></p> <p>在 Windows 10 上,打开 xml 文件后,您可以通过执行“运行 (Win+R)”->“%systemroot%\system32 12\IEChooser.exe”来打开开发人员工具</p> </question> <answer tick="true" vote="1"> <p>至于我的建议,要使用该库进行序列化,其外观如下(在实际使用中,不要通过 HTTP(S) 导入,请使用本地副本 <pre><code>xsl:import</code></pre>):</p> <pre><code>&lt;xsl:stylesheet xmlns:xsl=&#34;http://www.w3.org/1999/XSL/Transform&#34; version=&#34;1.0&#34;&gt; &lt;xsl:import href=&#34;https://lenzconsulting.com/xml-to-string/xml-to-string.xsl&#34;/&gt; &lt;xsl:output method=&#34;html&#34; indent=&#34;no&#34; version=&#34;5.0&#34; doctype-system=&#34;about:legacy-doctype&#34; /&gt; &lt;xsl:template match=&#34;/&#34;&gt; &lt;xsl:apply-templates/&gt; &lt;/xsl:template&gt; &lt;xsl:template match=&#34;root&#34;&gt; &lt;html&gt; &lt;head&gt; &lt;script type=&#39;application/xml&#39;&gt; &lt;xsl:apply-templates select=&#34;.&#34; mode=&#34;xml-to-string&#34;/&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt;qwe&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>这应该给你一个 <pre><code>script</code></pre> 元素,它的文本/CDATA 内容具有输入文档的 <pre><code>root</code></pre> 元素的序列化。</p> <p>至于序列化空元素的方式,在 XML 中应该不重要,但库允许您设置 <pre><code>&lt;xsl:param name=&#34;use-empty-syntax&#34; select=&#34;false()&#34;/&gt;</code></pre> 来获取例如<pre><code>&lt;param name=&#34;name&#34;&gt;&lt;/param&gt;</code></pre>。</p> </answer> </body></html>

回答 0 投票 0

IE11 XSLT 将 <param> 节点转换为自闭合标签

这个问题与此非常相关 输出到 DOM 时,XSLT 将 节点转换为 标签 考虑这段代码: <question vote="0"> <p>这个问题与此非常相关 <a href="https://stackoverflow.com/questions/78266294/xslt-converts-image-node-to-img-tag-when-outputiing-to-dom">XSLT 在输出到 DOM 时将 <image> 节点转换为 <img> 标签</a></p> <p>考虑这段代码:</p> <pre><code>&lt;script type=&#34;application/xml&#34; id=&#34;data&#34;&gt; &lt;xsl:copy-of select=&#34;/*&#34; /&gt; &lt;/script&gt; </code></pre> <p>这会将 XML 文档的内容输出到 html 页面中。 然后,可以很容易地通过 javascript 的 DOMParser() 对象解析 XML 中的数据,从而可以在网页上轻松访问这些数据,而无需使用 XSLT 生成网页。</p> <p>需要在脚本标签之间移动 <xsl:copy-of select"/*" />,以防止 XSLT 转换器将 XML 文件中的节点转换为 HTML 中的标签。</p> <p>这工作得很好,直到我发现节点也发生了同样的情况。简单地说:如果 XML 有节点,输出将被破坏且无法解析,如下所示:</p> <p><a href="https://i.stack.imgur.com/Ns44i.png" target="_blank"><img src="https://cdn.txt58.com/i/AWkuc3RhY2suaW1ndXIuY29tL05zNDRpLnBuZw==" alt=""/></a></p> <p>如何防止这种行为?如何阻止浏览器引擎使标签成为自关闭标签?</p> <pre><code>new DOMParser().parseFromString() </code></pre> <p>/\ 不适用于自关闭节点。</p> <hr/> <p>好的,这里是重现此内容所需的文件:</p> <p>测试.xslt</p> <pre><code>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt; &lt;xsl:stylesheet xmlns:xsl=&#34;http://www.w3.org/1999/XSL/Transform&#34; version=&#34;1.0&#34;&gt; &lt;xsl:output method=&#34;html&#34; indent=&#34;no&#34; version=&#34;5.0&#34; /&gt; &lt;xsl:template match=&#34;/&#34;&gt; &lt;xsl:text disable-output-escaping=&#39;yes&#39;&gt;&amp;lt;!DOCTYPE html&gt;&lt;/xsl:text&gt; &lt;xsl:apply-templates select=&#34;root&#34; /&gt; &lt;/xsl:template&gt; &lt;xsl:template match=&#34;root&#34;&gt; &lt;html&gt; &lt;head&gt; &lt;script type=&#39;application/xml&#39;&gt; &lt;xsl:copy-of select=&#34;/*&#34; /&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt;qwe&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>测试.xml</p> <pre><code>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt; &lt;?xml-stylesheet type=&#34;text/xsl&#34; href=&#34;test.xslt&#34;?&gt; &lt;root&gt; &lt;object&gt; &lt;text&gt;text&lt;/text&gt; &lt;param name=&#34;name&#34;&gt;&lt;/param&gt; &lt;/object&gt; &lt;/root&gt; </code></pre> <p>在 Internet Explorer 11 兼容模式下使用 Edge 打开 test.xml。 “head”应该包含一个带有扭曲 xml 的脚本。</p> <p><a href="https://i.stack.imgur.com/N6RRV.png" target="_blank"><img src="https://cdn.txt58.com/i/AWkuc3RhY2suaW1ndXIuY29tL042UlJWLnBuZw==" alt=""/></a></p> <p>在 Windows 10 上,打开 xml 文件后,您可以通过执行“运行 (Win+R)”->“%systemroot%\system32 12\IEChooser.exe”来打开开发人员工具</p> </question> <answer tick="false" vote="0"> <p>至于我的建议,要使用该库进行序列化,其外观如下(在实际使用中,不要通过 HTTP(S) 导入,请使用本地副本 <pre><code>xsl:import</code></pre>):</p> <pre><code>&lt;xsl:stylesheet xmlns:xsl=&#34;http://www.w3.org/1999/XSL/Transform&#34; version=&#34;1.0&#34;&gt; &lt;xsl:import href=&#34;https://lenzconsulting.com/xml-to-string/xml-to-string.xsl&#34;/&gt; &lt;xsl:output method=&#34;html&#34; indent=&#34;no&#34; version=&#34;5.0&#34; doctype-system=&#34;about:legacy-doctype&#34; /&gt; &lt;xsl:template match=&#34;/&#34;&gt; &lt;xsl:apply-templates/&gt; &lt;/xsl:template&gt; &lt;xsl:template match=&#34;root&#34;&gt; &lt;html&gt; &lt;head&gt; &lt;script type=&#39;application/xml&#39;&gt; &lt;xsl:apply-templates select=&#34;.&#34; mode=&#34;xml-to-string&#34;/&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt;qwe&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>这应该为您提供一个 <pre><code>script</code></pre> 元素,其文本/CDATA 内容具有输入文档的 <pre><code>root</code></pre> 元素的序列化。</p> </answer> </body></html>

回答 0 投票 0

在硒中获取“对象不支持属性或方法“评估””| IE

我正在 IE(Internet Explorer)浏览器上自动化 Web 应用程序。 当我在页面加载后尝试查找页面上的任何元素时,出现以下错误。 selenium.common.exceptions.

回答 1 投票 0

XSLT 在输出到 DOM 时将 <image> 节点转换为 <img> 标签

现在是 2024 年,我正在做一个融合 XSLT 技术的项目。 我想出了一种简单的方法来访问 XML 文件,该文件正在使用 javascript 进行简单转换,但将其输出到 hi...

回答 1 投票 0

乌尔都语文本在某些计算机上的 Internet Explorer 中无法正确显示

我正在使用以下代码使用 Web 浏览器控件在 Microsoft Access Form 中生成图表,并且在大多数计算机上它运行得很好,包括 Windows 7 SP1 和 Windows 10 b...

回答 1 投票 0

简单 JavaScript 书签无法在 EDGE 兼容模式 ie11 上运行

我正在尝试运行以下 JavaScript 作为网站/webapp* 上的测试。 javascript: {window.alert("Hello World")} *此网站/网络应用程序强制 EDGE 浏览器在 IE11 上运行

回答 2 投票 0

Microsoft Edge 不断提示输入证书

我有一个使用证书(*.p12)来验证用户身份的应用程序。我希望能够在 Microsoft Edge(版本 42)和 Internet Explorer(版本 11)中使用它,但这些浏览器给了我

回答 1 投票 0

在 Azure DevOps 服务器中触发 Selenium 测试执行时,不会为 Internet Explorer 浏览器捕获屏幕截图

我们很少有使用 Selenium 和 C# 进行自动化的测试用例。我们需要在 Internet Explorer 11 中运行测试。测试用例在本地系统中完美执行,但是当我们使用 Az 远程运行测试时...

回答 1 投票 0

focus() 在 IE 11 中不起作用

我有以下 HTML: <%-sometext%> 我有以下HTML: <div id="blocked-layer-parent"> <textarea id="paint-textarea" placeholder="Enter text" autofocus><%-sometext%></textarea> <div id="blocked-layer"></div> </div> 在 IE 11 自动对焦 不起作用。我尝试使用像这样的 focus 函数: $("#paint-textarea").focus(); 或者这个: var textAreaElement = document.getElementById("paint-textarea"); setTimeout(function() { textAreaElement.focus(); }, 2100); 但是 textarea 在 IE 11 中没有获得焦点。我看了不同的决定(例如 jQuery focus() 有时在 IE8 中不起作用 和 focus 在 IE 中不起作用),但没有人不起作用。 感谢您的帮助。 P.S. textarea 的 placeholder 正在 IE 中转换为文本 (textelement)。我觉得很奇怪。在应用程序的其他模块中,我有 input 和 placeholder 用于搜索。这个占位符就像占位符一样(在输入字符后消失)。在一些显示 placeholder 的对话框发生文本转换并且搜索停止工作后。也许问题与此有关? 我在上尝试了纯html和js,它有效。也许 css 导致了这个问题。 在 DOMContentLoaded 事件中添加此代码(页面加载后) document.addEventListener("DOMContentLoaded", (e) => { document.getElementById("elementID").focus(); });

回答 2 投票 0

我无法在win11中使用IE11打开网站

我们仍然有一些基于旧框架设计的网站。 当我点击邮件中的超链接时,无法在Win11中的IE11中直接打开它。 我该如何解决这个问题? 谢谢。 我尝试设置

回答 1 投票 0

JavaScriptexecutor在selenium上设置属性值

我正在 IE11 上执行 selenium 自动化。现在对于一个元素,说 ele; ele.sendKeys(characters) 不能直接工作。所以我试图更改该值的“值”属性...

回答 1 投票 0

Edge IE 模式 - 本地组策略

我想出了如何为我自己的本地测试设置本地组策略...通过 gpedit... 本地计算机策略 --> 管理模板 --> Microsoft Edge 配置 Internet Explorer 集成...

回答 2 投票 0

在 Windows 10 上强制打开 Internet Explorer 11 而不是 Edge

我知道 IE11 已停用,不建议使用,但我需要它。 我们有一个测试实验室(与互联网隔离),用于一些运行 Windows 10 企业版的 Windows 10 电脑(用于旧版应用程序)

回答 1 投票 0

Internet Explorer 11 快捷方式

我有这个vbs脚本 设置 IE = WScript.CreateObject("InternetExplorer.Application", "IE") IE.导航“https://mail.yahoo.com/” IE.Navigate2“https://hotnews.ro...

回答 1 投票 0

jQuery 无法在 IE11 上运行,但可以在 Chrome、Firefox 和 Edge 上运行?

我的脚本在除 IE11 之外的所有其他浏览器上都运行良好。例如 jQuery('#btnblacklist').click(function(){ jQuery('#popUpBlackList').css("显示","阻止"); jQuery('.cover').css('

回答 1 投票 0

Edge 和 IE11 上的长输入模式验证失败

我正在检查电子邮件字段,以在末尾使用这些 TLD 的长列表来包含任何接受的域名 领域 这是一个缩短版本...

回答 1 投票 0

IE11 下拉项目突出显示但不应该

我正在开发一个存在 IE11 特定问题的项目,并且认为您可以提供帮助。 当我在 Chrome 中并在下拉列表中选择一个项目时,所选项目不会突出显示:...

回答 1 投票 0

docker 文件 pip 安装在本地

这是我的 docker 文件: 工作目录/扫描 运行 pip 安装 pymongo 运行 pip install netmiko 运行 pip install pyats[完整] ENV测试台= ENV arr= # ENV 设备= # 环境 ID= 复制 。 /扫描 入口点 ["pyth...

回答 1 投票 0

div 内容到图像

这是我的代码,我使用IE 11在我的项目上进行测试,下载功能不起作用。我想让它下载内容到图像,请帮我解决方案,谢谢: 这是我的代码,我使用IE 11在我的项目上进行测试,下载功能不起作用。我想让它下载内容到图像,请帮我解决方案,谢谢。: <!DOCTYPE html> <html> <head> <title>Save Page Content as Image</title> <style> /* Styles for the content to be captured */ #contentToCapture { width: 400px; padding: 20px; background-color: lightgray; } </style> </head> <body> <div id="contentToCapture"> <h1>Sample Content</h1> <p>This is the content you want to capture and save as an image.</p> </div> <button id="captureButton">Capture and Save as Image</button> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.3.2/html2canvas.min.js"></script> <script> $(document).ready(function() { // Click event handler for the capture button $('#captureButton').click(function() { // Get the element you want to capture var elementToCapture = document.getElementById('contentToCapture'); // Use html2canvas to render the element as a canvas html2canvas(elementToCapture).then(function(canvas) { // Convert the canvas to a data URL var dataUrl = canvas.toDataURL(); // Create a link to trigger the download var link = document.createElement('a'); link.href = dataUrl; link.download = 'captured-content.png'; link.click(); }); }); }); </script> </body> </html> 我正在使用 IE 11 来测试我的项目,下载功能不起作用。我想让它下载内容到图像,请帮我解决方案,谢谢。 尝试从数据 URL 转换为 Blob 对象,然后使用 msSaveOrOpenBlob 方法触发下载。以下是修改代码以使其在 IE 11 中运行的方法: <!DOCTYPE html> <html> <head> <title>Save Page Content as Image</title> <style> /* Styles for the content to be captured */ #contentToCapture { width: 400px; padding: 20px; background-color: lightgray; } </style> </head> <body> <div id="contentToCapture"> <h1>Sample Content</h1> <p>This is the content you want to capture and save as an image.</p> </div> <button id="captureButton">Capture and Save as Image</button> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.3.2/html2canvas.min.js"></script> <script> $(document).ready(function() { // Click event handler for the capture button $('#captureButton').click(function() { // Get the element you want to capture var elementToCapture = document.getElementById('contentToCapture'); // Use html2canvas to render the element as a canvas html2canvas(elementToCapture).then(function(canvas) { // Convert the canvas to a Blob object canvas.toBlob(function(blob) { // Create a temporary anchor element to trigger the download var link = document.createElement('a'); link.href = window.URL.createObjectURL(blob); link.download = 'captured-content.png'; // For IE 11 if (window.navigator.msSaveOrOpenBlob) { window.navigator.msSaveOrOpenBlob(blob, 'captured-content.png'); } else { // For other browsers link.click(); } }); }); }); }); </script> </body> </html>

回答 1 投票 0

nuxt i18n 无法在 IE 中运行并抛出 SCRIPT1006:应为 ')'

我正在尝试使 nuxt-i18n 适用于 IE 文档模式 11。 SCRIPT1006:应为“)” 我从这个链接看到 nuxt-i18n 修复了 6.23.0 版本中与脚本错误相关的问题, 嗯……

回答 0 投票 0

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