@Wikan
Prosím tě, šla by tahle funkce poopravit?
function download() {
var anchor = document.querySelector("a");
anchor.setAttribute(
"href",
"data:text/html;charset=UTF-8," +
encodeURIComponent(document.documentElement.outerHTML)
);
anchor.setAttribute("download", "index.html");
}
Teď se funkce volá
<a href="#" onclick="download()">Download</a>
bylo by fajn, kdyby jsem ji mohl zavolat pouze položkou v seznamu
<li onclick="download()">Download</li>
Díky