好吧,我有一个用户创建的图像。当他们完成创建图像时,我会出现一个按钮,上面写着SAVE。我想做的是提示用户将页面上的图像保存在本地磁盘上,或者保存在他们想放的地方。我在这里查看了一下,似乎没有什么能直接回答这个问题。
提前谢谢。
单击按钮即可使用AJAX保存数据。如果你想要样品,或者我误解了你的问题,请告诉我。
您的保存按钮:
您的jQuery:
$(document).ready(function(){
$.ajax({
url: 'yourSaveScript.php',
type: 'post',
data: $('#yourForm').searialize(),
error: function(data){
alert("There was an error while inserting into the database.");
},
success: function(data) {
alert("Successfully saved!");
}
})
});