Javascript download file onclick

Just open the file's link on the browser and the download will automatically start. Should I always put my JavaScript file in the head tag of my HTML file so that 

Upload file javascript . GitHub Gist: instantly share code, notes, and snippets.

Lets say i have two links to same file called "cat.avi" Play Movie and Download Movie when the user clicks the second link, how can i make the file to be prompted for a download, instead of

Download file when clicking on the link (instead of navigating to the file): The download attribute specifies that the target will be downloaded when a user  The download attribute is only used if the href attribute is set. The value of the attribute will be the name of the downloaded file. There are no restrictions on  The value of the attribute will be the name of the downloaded file. automatically detect the correct file extension and add it to the file (.img, .pdf, .txt, .html, etc.). 19 May 2013 All rights reserved | This template is made with by Colorlib