ShuDudu's Home was started in 2011, but the web data is lost, so now begin again, I would like to make some friends, I hope you like ShuDudu's home.
Current position: ShuDudu > Life >

Download files in.html format

Tuesday on October 25th, 2005Life

.html Download Locally implemented

through javascript

index.html

< a href=# onclick=" window.open ('temp.html');return(false);"> Download files</a>

temp. html//downloaded file

<Script language=" javascript"> if (typeof(window.opener) != 'undefined') //Determine the download method to open. Remove it and a download box will pop up as soon as the file is opened { document.execCommand('SaveAs'); window.close(); } </Script> 
<button onclick= javascript:document.execCommand ('SaveAs '); Save this page/button>

Copyright Protection: ShuDudu from the original article, reproduced Please keep the link: https://www.shududu.com/life/Download-files-in-html-format.htm