最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Layui表格选中指定行的radio单选框并滚动到该行的实现分析
时间:2022-09-27 编辑:坚强 来源:一聚教程网
本文为你介绍了关于Layui表格选中指定行的radio单选框并滚动到该行的实现分析,感兴趣的小伙伴一起来看看吧。
layui table有多行数据,通过外部输入内容,需要定位到指定行,选中改行,对改行进行操作。
实现效果:
HTML代码:
73
后台代码:
public class LayUITableEntity { public string code { get; set; } public string msg { get; set; } public string count { get; set; } public object data { get; set; } } public class TestEntity { ////// 这个字段用来标识radio是否选中 /// public bool LAY_CHECKED { get; set; } = false; public string Id { get; set; } public string Name { get; set; } } [Route("/api/test")] public class TestController : ServiceController { [RouteHttpGet("hello")] public FormiumResponse HelloNanUI(FormiumRequest request) { ListteList = new List (); for (int i = 1; i <= 30; i++) { TestEntity te = new TestEntity() { //初次载入,id为3的选中 LAY_CHECKED = i == 3 ? true : false, Id = i.ToString(), Name = "name" + i.ToString() 32 }; teList.Add(te); } LayUITableEntity layUITableEntity = new LayUITableEntity() { code = "0", count = teList.Count().ToString(), msg = "", data = teList }; return Json(layUITableEntity); } }
以上就是关于Layui表格选中指定行的radio单选框并滚动到该行的实现分析全部内容了,感兴趣的小伙伴记得点击关注哦。
相关文章
- HTML简单购物数量小程序代码展示 10-31
- html canvas实现弹幕功能 10-31
- HTML中空格表示的意义 10-31
- html area标签解读 10-31
- html使用表单标签实现注册页面代码展示 10-31
- 使用HTML截图并保存为本地图片的代码展示 10-31