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;
    }
    })

  • 相关阅读:
    11Java网络编程
    Java字节流与字符流
    10缓冲流、转换流、序列化流、Files
    JavaFile类和递归
    Java线程池 与Lambda
    Java多线程与线程同步
    5Java异常处理
    php base64数据与图片的转换
    PHP的json_encode中文被转码的问题
    设置MySQL允许外网访问
  • 原文地址:https://www.cnblogs.com/ouyangxiaoyao/p/5725556.html
Copyright © 2011-2022 走看看