zoukankan      html  css  js  c++  java
  • 1016 Repeater-重复器

    Repeater-重复器,放表格的

    五大模板:
    HeaderTemplate -表头
    ItemTemplate - 表格的内容
    FooterTemplate - 说白了就放</table>

    AlternatingItemTemplate - 与ItemTemplate搭配用,间隔颜色不同

    数据绑定:

    Repeater1.DataSource-数据源指向

    Repeater1.DataBind();数据绑定

    问题一:
     将数据显示成最终数据
     字段扩展(在封装成员变量的时候就写好了)
     
    问题二:
     将年龄在16岁以上的人员标红

    也使用字段扩展
     
    问题三:
     光棒效果,并且保留原有颜色

    使用方法

      var oItems = document.getElementsByClassName("tr_item");//获取表格
                for (var i = 0; i < oItems.length; i++)
                {
                    var oldColor = "";//记录原来的颜色

                     //移入变色
                    oItems[i].onmouseover = function () {
                        oldColor = this.style.backgroundColor;
                        this.style.backgroundColor = "yellow";
                    };

                    //移出变回原来颜色

                    oItems[i].onmouseout = function () {
                        this.style.backgroundColor = oldColor;

                    };
                }

  • 相关阅读:
    LG gram 双系统全指南
    离散数学读书记录
    研究小报告:掺杂硅脂对处理器散热能力的影响
    SICP 课程总结 & 复习
    maxHeap 的 python 实现
    KDD Cup 2018 冠军团队 思路分享
    mergeSort, quickSort, shellSort 的 python 实现
    数据集-搜集
    【NOIP2018模拟赛】
    【NOIP2018 模拟】
  • 原文地址:https://www.cnblogs.com/a12110303043/p/5967311.html
Copyright © 2011-2022 走看看