jquery json ajax 没有返回回调函数
functionaddPdayTripInfo(){if(window.confirm("确定保存?")){vardata={};/*单个产品每日行程添加*/data["...
function addPdayTripInfo() { if(window.confirm("确定保存?")) { var data = {}; /* 单个产品每日行程添加 */ data["pdayTripInfo.pproductId"] = "<%=productId%>"; data["pdayTripInfo.daySequence"] = document.getElementById("daySequence").value; data["pdayTripInfo.travelLine"] = document.getElementById("travelLine").value; data["pdayTripInfo.tripDesc"] = document.getElementById("tripDesc").value; data["pdayTripInfo.remark"] = document.getElementById("remark").value; data["pdayTripInfo.imgPath"] = document.getElementById("imgPath").value; var url="<%=path%>/ProductAjax/savePdayTripInfo.shtml"; $.post(url,data,function(msg) { alert(msg.result); if(msg.result == "success") { alert("保存成功!"); window.location = "<%=path%>/action/pproduct!list.shtml"; } else { alert("保存失败!"); } } ,"json"); } }
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询