开发者

Is it possible to download a file given filepath using javascript/jquery?

I use json data with jquery... I have filepaths in json and i am i开发者_StackOverflowterating with jquery...

var divs='';
$.each(jsob.Table, function(i, user) {
                divs += '<a class="download" href=' + user.resume_path + '/>'
            });
            $("#ResultsDiv").append(divs);

It works but how to make my anchor open file/save dialog box where the admin can download that resume... Any suggestion...


Whether or not a document triggers a file save dialog is dependent on how the browser handles that file type. If it's something the browser knows how to display, either natively or via a plugin of some sort, it will display in the browser. If not, then the user will be prompted to save the document.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜