52,797
社区成员
发帖
与我相关
我的任务
分享
$("#btnSubmitMoney").click(function () {
var nowDate = ""; //当天日期
var money = ""; //当天销售额
var theDate = new Date();
nowDate = theDate.getYear() + "-" + (theDate.getMonth() + 1) + "-" + theDate.getDate();
money = $("#txtMoney").val();
addNowMoney(nowDate, money);
});
function addNowMoney(date, money) {
$.post("ajax_API/ajaxapi.ashx", { fun: "AddMoney", date: date, money: money }, function (result) {
if (result == "repeat") {
alert("“" + date + "”记录已存在!");
} else if (result == "success") {
alert("提交成功");
} else if (result == "failure") {
alert("提交失败");
} else {
alert("未知错误");
}
});
}
string date = context.Request.Params["date"];