js File Download not asking code example
Example: javascript download file
$('a#someID').attr({target: '_blank',
href : 'http://localhost/directory/file.pdf'});
$('a#someID').attr({target: '_blank',
href : 'http://localhost/directory/file.pdf'});