how can i Grab Source code & save it in text file
<p>I need your help to grab the source code of the page &amp; can save it in a text file.</p>

<p><strong>What actually i want!!</strong>
Instead of doing the lot of work like, right click on the page then click on view source code then to copy &amp; paste it in a text file...</p>

<p>I want to make a short, i want to put a link on the page, in which i need to grab a source code, so when i just click on that link let say "Download Code" it grabs the current page source code &amp; save it in a .txt format.</p>

<p>Kindly help me how can i do this?? it would be great if i can achieve this by using a java script, i don't want to use server side programming language.</p>

<p>I tried data URI but dont get the exact what i need</p>
