【发布时间】:2017-06-09 17:22:33
【问题描述】:
我一直在一个名为 data:text/html 的链接上编码,(如果你写在地址栏中,你可以写任何 html 和 css 之后。)有谁知道如何缩短这个链接,我试过 goo .gl 和 bitly,但它说它无法创建链接。这是我的代码:
data:text/html, <!DOCTYPE html> <html lang="en-us"> <head> <title>Griffin Inc</title> <link rel="icon" href="https://docs.google.com/a/my.rbusd.org/drawings/d/1RbhLPr2Jq2WL-NCKn0lMKVkM3fPw-ZRUdFTurpLHkBk/pub?w=960&h=720"> <link href="https://preview.c9users.io/check222/new-tab/style.css" rel="stylesheet"> <script src="https://preview.c9users.io/check222/new-tab/main.js"></script> </head> <body id="body"> <marquee loop="-1" scrollamount="7" width="100%" id="google-search-engine-marquee"> <strong>Search Griffin Inc</strong> </marquee> <form action="https://www.google.com/search" method="get"> <input type="search" name="q" placeholder="Google" title="Search" id="search-bar"> <input type="submit" value="Search" id="search-button"> </form><p style="color: black">Color Picker:<input id="color_picker" type="color" onchange="showHex();"><p style="color: black">Type notes here: </p> <textarea id="notes"></textarea> <p></p> <button id="Google-Docs" class="pageContent" onclick="window.open('https://docs.google.com/document/u/0/?tgif=d')">Google Docs</button> <button id="Google-Drive" class="pageContent" onclick="window.open('https://drive.google.com/drive/my-drive')">Google Drive</button> <button id="Google-Slides" class="pageContent" onclick="window.open('https://docs.google.com/presentation/u/0/?tgif=d')">Google Slides</button> <button id="Google-Drawings" class="pageContent" onclick="window.open('https://docs.google.com/drawings/d/1YTlXmt29AVduvI2OnSfYYMKw1IrcB3LPFPBh6g1p6TI/edit')">Google Drawings</button> <iframe src="http://schneider7.weebly.com/homework--due-dates" width="100%" height="1000"/> </body> </html>
【问题讨论】:
-
链接缩短服务可能对链接的大小有限制。为什么需要将整个 HTML 文档直接放在链接中,而不是放在服务器上?
-
您需要在导航后从网址栏中复制该链接;如图所示,它是无效的,但 url 栏会为你转义它,然后它可能适用于一些“小 url”服务。
-
因为它的格式无效。要么对其进行编码,要么在 goo.go 中,关闭前端验证并尝试
标签: html data-uri url-shortener