旧的$location.url(url).replace();
已重命名为[HttpPost]
public JsonResult CalendarCellClasses(DateTime date)
{
DateTime firstOfMonth = date.AddDays(-(date.Day - 1));
DateTime lastOfMonth = firstOfMonth.AddMonths(1).AddDays(-1);
int additionalDaysBefore = firstOfMonth.DayOfWeek == DayOfWeek.Sunday ? 0 : (int)firstOfMonth.DayOfWeek - 1;
int additionalDaysAfter = lastOfMonth.DayOfWeek == DayOfWeek.Sunday ? 0 : 7 - (int)lastOfMonth.DayOfWeek;
int daysInMonth = lastOfMonth.Day;
int totalDays = additionalDaysBefore + additionalDaysAfter + daysInMonth;
int numWeeks = totalDays/7;
DateTime firstDayInSeries = firstOfMonth.AddDays(-additionalDaysBefore);
DateTime lastDayInSeries = lastOfMonth.AddDays(additionalDaysAfter);
DateTime current = firstDayInSeries;
string[,] dates = new string[numWeeks,7];
for (int week = 0; week < numWeeks; week++)
{
for (int day = 0; day < 7; day++)
{
dates[week, day] = TrafficData.GetTrafficDate(current).CSSClass;
current = current.AddDays(1);
}
}
return Json(dates);
}
。到目前为止我看到的所有例子都很好地将粒子显示为黑色背景上的立方体。
是否可以在白色背景上显示球体而不是立方体?任何人都可以请我指出一段代码吗?