- 博客(4)
- 资源 (1)
- 收藏
- 关注

原创 JS实现翻页保持Checkbox选中状态
项目中需要翻页,但保持复选框的选中状态。本人的思路是将:选中的值存储在数组中,并将数组存储在localStorage中,翻页时判断页面是否包含当前数组存在的Id值,如果存在则将状态变为选中状态。 1、页面标签 这里data.Id绑定的页面数据中的Id <td><input type="checkbox" value="@data.Id" name="ids" id="ids" /></td> 2、JS代码 $(document).ready(function (e) {
2020-10-30 17:07:15
1946
原创 C# 父类转换为子类
public static TChild AutoCopy<TParent, TChild>(TParent parent) where TChild : TParent, new() { TChild child = new TChild(); var ParentType = typeof(TParent); var Properties = ParentType.GetProperties(); foreach (var Propertie in Properties) { //循环遍历属
2020-12-22 17:29:32
703
原创 SQL Server解除表死锁
if exists(select * from master.sys.sysprocesses where spid in (select blocked from master.sys.sysprocesses)) begin —确定进程被锁住的其他资源 select spid 进程,STATUS 状态, 登录帐号=SUBSTRING(SUSER_SNAME(sid),1,30) ,用户机器名称=SUBSTRING(hostname,1,12) ,是否被锁住=convert(char(3),blocked
2020-12-22 17:25:19
1263
原创 JS转换日期格式
ConvDate(time) { let val = time if (val != null || val != “undefind”) { var date = new Date(parseInt(val.replace("/Date(", “”).replace(")/", “”), 10)); //月份为0-11,所以+1,月份小于10时补个0 var month = date.getMonth() + 1 < 10 ? “0” + (date.getMonth() + 1) : date.g
2020-10-30 17:16:32
174
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人