如何使用 C#/JQuery 更改 XSL 文件的内容样式
本文关键字:文件 样式 XSL 更改 何使用 JQuery | 更新日期: 2023-09-27 18:29:40
如果spnCity
的值是"ABC",则将id1
设置为类(tableHeading
(,否则id1
设置为类(tableHeading2
(
如何从 Web 处理程序中的代码隐藏访问spnCity
范围,或者如果不可能,如何使用 JQuery 访问它。
我的偏好是真正使用 C# 代码隐藏,因为我有一个执行一些复杂操作的函数。
DateTime now = DateTime.Now;
//DateTime test = DateTime.Now.AddHours(8);
string time = now.ToString("T");
static public bool IsTimeOfDayBetween(DateTime time, TimeSpan startTime, TimeSpan endTime)
{
if (endTime == startTime)
{
return true;
}
else if (endTime < startTime)
{
return time.TimeOfDay <= endTime ||
time.TimeOfDay >= startTime;
}
else
{
return time.TimeOfDay >= startTime &&
time.TimeOfDay <= endTime;
}
}
既然你问了if that is not possible, how do I access it using JQuery.
,我正在写答案以使用jquery
访问它。下面是访问该范围值jQuery
代码。
$("#id1 h4 span").text().trim()