$.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';
}
});
上面的代码只是加载了一个带有音乐播放器的新页面。我希望它像文件一样下载。