如何在Internet Explorer中将数据URI用作URL? [英] How can I use the data URI in internet explorer as a URL?

查看:104
本文介绍了如何在Internet Explorer中将数据URI用作URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要使用的代码是

data:text/html,
<body contenteditable style="font: 2rem/1.5 monospace;
                             max-width:60rem;
                             margin:0 auto;
                             padding:4rem;">

我在网站上找到了它.我想只将其放在URL上,然后按Enter键,但仅适用于Chrome,Firefox和Opera.在IE上将无法使用.如何在IE上制作记事本?

I found it on a webiste. I'm suppose to just place it on the URL and hit enter but only for Chrome, Firefox and Opera. It won't work on IE. How can I make a notepad on IE?

更多信息: 我使用的是工作电脑,无法访问任何网站或程序.没有文件浏览器,右键单击上下文菜单,只有IE.

More info: Im using a work pc and I can't access any website nor programs. No file explorer, right click context menu, only has IE.

推荐答案

您可以尝试使用javascript引擎创建类似的执行.

You can try using the javascript engine to create a similar execution.

在网址栏中:

javascript:window.document.write('<body contenteditable style="font: 2em/1.5 monospace;max-width:60em;margin:0 auto;padding:4em;">');

如果您复制粘贴,则需要在其前面手动键入 javascript:,因为浏览器会修剪粘贴时的那一部分.

If you copy and paste you will need to manually type javascript: in front of it since the browser trims that part of on paste.

如果您想以编辑器的身份执行新窗口,请尝试以下操作:

<script>
    function myFunction() {
        var myWindow = window.open("", "MyEditorWindow");
        myWindow.document.write("<body contenteditable style=\"font: 2em/1.5 monospace;padding:40px;\">");
}
</script>

查看此 jsFiddle示例

这篇关于如何在Internet Explorer中将数据URI用作URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆