my jquery sample source log:save media file not play media file

'saveas':function (url){
setTimeout(function(){
var id = "saveasiframeobj_objhelper";
var obj = document.getElementById(id);
if(!obj){
obj = document.createElement("a");
obj.target="_blank";
obj.id=id;
obj.style.display = "none";
obj.download='';
document.body.appendChild(obj);
}
obj.href = url;
obj.click();
},0);
}



note: obj.download attribute. this is used by browser to download, not play it .it can replace system saveas method. good prefected for pkrss.


if you want to special the save as downloadfilename.postfix,you can like this:

obj.download='downloadfilename';



this is from my project http://www.pk17s.cn ‘s part source sample. you can used anytimers.

Comments

Popular posts from this blog

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3

Global can earn money wordpress blog Advertising Alliance Introduction–1 BidVertiser

pkrss发布