$.ajax({
type: "POST",
url: "processform.php",
dataType: "json",
data: {name: name, email: email, city: city, country: country, day: day, month: month, year: year}
}).done(function(msg){
if(msg.success == 1){
$("#success_msg").append('<p>'+msg.message+'</p>');
window.location.href = './music/song.mp3';
}
});
以上代码只是加载一个带有音乐播放器的新页面。我希望它像下载文件一样下载。