这个范例里的【保存到本地】按钮,可以上传成功,但却没有任何反应。 查看代码上传后会有弹窗的(有alert语句的)。
而 saveForm() 应该是:
function saveForm() {
var upload_btn_pic = $("#upload_btn_pic").attr("src");
var upload_btn2_pic = $("#upload_btn2_pic").attr("src");
$.post("upload.asp", {upload_btn_pic: upload_btn_pic, upload_btn2_pic: upload_btn2_pic}, function(data) {
alert("本地保存的图片:" + data.upload_btn_pic + "|" + data.upload_btn2_pic)
}, "json")
} |