我在 jquery 中有一个变量。首先是添加一些值。现在再次向现有变量添加更多值。这是我的代码。如果有人知道帮助我......
var eventToAdd = {
title: $("#txtSubject").val(),
description: $("#addEventDesc").val(),
start: $("#txtStartdate").val(),
end: $("#txtEnddate").val()
};
var ChkBox = document.getElementById("rbtnHourly");
if (ChkBox.checked == true) {
**eventToAdd = {**
FREQ: "Hourly",
INTERVAL: $("#updown").val(),
BYSETPOS: "",
BYDAY: "",
BYMONTH: "",
BYMONTHDAY: ""
};
}
var ChkBox = document.getElementById("rbtnDaily");
if (ChkBox.checked == true) {
var rbtnEveryday = document.getElementById("rbtnEveryday");
if (rbtnEveryday.checked == true) {
**eventToAdd = {**
FREQ: "Daily",
INTERVAL: $("#TextBox1").val(),
BYSETPOS: "",
BYDAY: "MO,TU,WE,TH,FR,SA,SU",
BYMONTH: "",
BYMONTHDAY: ""
};
}
else {
**var eventToAdd1 = {**
FREQ: "Daily",
INTERVAL: 1,
BYSETPOS: "",
BYDAY: "MO,TU,WE,TH,FR",
BYMONTH: "",
BYMONTHDAY: ""
};
};
}