Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Fonte Link

Você pode usar um atributo do HTML5: download="pagina.html"

Exemplo:

<a download="pagina.html" href="data:text/html;charset=utf-8,<html><body><h1>conteúdo/h1></body></html>">Clique aqui</a>
  1. http://www.w3.org/TR/html/links.html#downloading-resources
  2. http://stackoverflow.com/questions/6468517/force-download-of-datatext-plain-url/20282249#20282249https://stackoverflow.com/questions/6468517/force-download-of-datatext-plain-url/20282249#20282249

Você pode usar um atributo do HTML5: download="pagina.html"

Exemplo:

<a download="pagina.html" href="data:text/html;charset=utf-8,<html><body><h1>conteúdo/h1></body></html>">Clique aqui</a>
  1. http://www.w3.org/TR/html/links.html#downloading-resources
  2. http://stackoverflow.com/questions/6468517/force-download-of-datatext-plain-url/20282249#20282249

Você pode usar um atributo do HTML5: download="pagina.html"

Exemplo:

<a download="pagina.html" href="data:text/html;charset=utf-8,<html><body><h1>conteúdo/h1></body></html>">Clique aqui</a>
  1. http://www.w3.org/TR/html/links.html#downloading-resources
  2. https://stackoverflow.com/questions/6468517/force-download-of-datatext-plain-url/20282249#20282249
Fonte Link
Laerte
  • 22,8mil
  • 19
  • 86
  • 130

Você pode usar um atributo do HTML5: download="pagina.html"

Exemplo:

<a download="pagina.html" href="data:text/html;charset=utf-8,<html><body><h1>conteúdo/h1></body></html>">Clique aqui</a>
  1. http://www.w3.org/TR/html/links.html#downloading-resources
  2. http://stackoverflow.com/questions/6468517/force-download-of-datatext-plain-url/20282249#20282249