zoukankan      html  css  js  c++  java
  • 选中repeater表格中的一行使其变色

    //table表中点击行,选中的那一行颜色会变成浅蓝色(颜色可以自己设定)

    //其中sellerTable 为table的id,
    $("#sellerTable tbody tr").mousedown(function () {
    $("#sellerTable tr").each(function () {
    $(this).css("background-color", "");
    });
    $(this).css("background-color", "#98D8F5");
    });

    //前台绑定按钮事件(通过遍历table中的颜色,每行颜色和表头颜色比较,颜色不一样的那一行,就为选中的那一行)

    $("#btnDelete").click(function () {
    var sellerCD = "";
    $('#sellerTable tr').each(function () {
    if ($(this).css("background-color") != $("th").css("background-color")) {
    sellerCD = $(this).find("td").eq(0).text();//令sellerCD为第一列的值
    return false;
    }
    });
    if (sellerCD == null || sellerCD == undefined || sellerCD == "") {
    alert("販売先情報を選択してください。");
    } else {

    //页面跳转时传送数据,可以到SellersDetail页面中获取该数据如: sellerCD = Request.QueryString["sellerCD"];

    window.location.href = "SellersDetail.aspx?type=delete&sellerCD=" + sellerCD;
    }
    })

  • 相关阅读:
    CF528D Fuzzy Search
    P3489 付公主的背包
    有标号的DAG计数
    P4609 [FJOI2016]建筑师
    mds/journal.cc: 2929: FAILED assert解决
    Ceph根据Crush位置读取数据
    关于backfill参数建议
    rados put striper功能的调试
    Cephfs的文件存到哪里了
    为什么删除的Ceph对象还能get
  • 原文地址:https://www.cnblogs.com/ouyangxiaoyao/p/5725556.html
Copyright © 2011-2022 走看看