张孝祥专栏

以平常心工作,远离忧虑,除了让自己快乐,也要让别人快乐!

张孝祥ID:zhangxiaoxiang
540374次访问,排名68好友4人,关注者48
zhangxiaoxiang的文章
原创 129 篇
翻译 0 篇
转载 2 篇
评论 300 篇
张孝祥的公告
《深入体验Java Web开发内幕——高级特性》已经出版。 传智播客开展:先培训,就业后再还款活。详细信息查询:http://www.itcast.cn/goodnews.htm
最近评论
ypf20062008:顶!顶!张老师加油!
yangfion171:那些人动不动就是 什么“数学第一”
没办法,当年我连名都上不了。。。
jakcysun:一看就是乱说,很不符合现实的!
zou_wei_forever:期待张老师的hibernate和spring系列类的书的出版,希望张老师继续发扬通俗易懂,对知识的深入剖析这一写作风格---永远支持你!!!!
GXZheng1985:很认真看完张老师的文章 ,看得出 您是一个非常尽心尽责的好老师 ,十分之佩服~~
但我感觉您的课程有些乏味,,基础很重要,不错,要让人接受好的东西,首先要让人感觉有意思,自然大家都会去学习~
文章分类
收藏
    相册
    传智播客原创教材展示
    培训
    《深入体验javaweb开发内幕——高级特性》出版啦!
    培训就业后还款计划正式启航
    良少的blog
    存档
    软件项目交易
    订阅我的博客
    XML聚合  FeedSky
    订阅到鲜果
    订阅到Google
    订阅到抓虾
    订阅到BlogLines
    订阅到Yahoo
    订阅到GouGou
    订阅到飞鸽
    订阅到Rojo
    订阅到newsgator
    订阅到netvibes

    转载 网上找到一个用不同颜色显示表格奇偶行的例子收藏

    新一篇: 第1次尝试div+css进行两栏式页面布局就遇到了IE的3px问题 | 旧一篇: 谁说80后的人不负责任!

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>双色表格CSS实例</title>
    <style type="text/css">
    #DataGrid1 tr {
        background-color: expression(
            this.sectionRowIndex == 0 ? "#FFCCCC" :
            (
                (this.sectionRowIndex % 2 == 0) ? "#FFF0F0" : "#F0F0FF"
            )
        );
        color: expression(this.sectionRowIndex == 0 ? "#FFFFFF" : "");
        font-weight: expression(this.sectionRowIndex == 0 ? "BOLD" : "");
        TableSelect: expression(
            this.sectionRowIndex == 0 ? "" :
            (
                onmouseover = function()
                {
                    this.style.backgroundColor =
                    (
                        this.style.backgroundColor != "#69cdff" ? "#69cdff" :
                        (
                            this.sectionRowIndex == 0 ? "#FFCCCC" :
                            (
                                this.sectionRowIndex % 2 == 0 ? "#FFF0F0" : "#F0F0FF"
                            )
                        )
                    )
                },
                onmouseout = function()
                {
                    this.style.backgroundColor =
                    (
                        this.style.backgroundColor != "#69cdff" ? "#69cdff" :
                        (
                            this.sectionRowIndex == 0 ? "#FFCCCC" :
                            (
                                this.sectionRowIndex % 2 == 0 ? "#FFF0F0" : "#F0F0FF"
                            )
                        )
                    )
                }
            )
        )
    }
    #DataGrid1 td {
        background-color:expression(
            this.cellIndex == 0 ?
            (
                this.parentElement.sectionRowIndex == 0 ? "#FFCCCC" : "#DDDDDD"
            )
            : null
        )
    }
    .FindAreaTable1 {
        font-size: 12px;
        color: #333333;
        text-decoration: none;
        width: 400px;
        cursor: hand;
        background-color: #FFFFFF;
        vertical-align: middle;
        text-align: center;
    }
    </style>
    </head>
    <body>
    <table cellspacing="1" class="FindAreaTable1" ID="DataGrid1">
      <tr>
        <td>首行首列</td>
        <td>首行</td>
        <td>首行</td>
        <td>首行</td>
        <td>首行</td>
        <td>首行</td>
      </tr>
      <tr>
        <td>行1首列</td>
        <td>行1</td>
        <td>行1</td>
        <td>行1</td>
        <td>行1</td>
        <td>行1</td>
      </tr>
      <tr>
        <td>行2首列</td>
        <td>行2</td>
        <td>行2</td>
        <td>行2</td>
        <td>行2</td>
        <td>行2</td>
      </tr>
      <tr>
        <td>行3首列</td>
        <td>行3</td>
        <td>行3</td>
        <td>行3</td>
        <td>行3</td>
        <td>行3</td>
      </tr>
      <tr>
        <td>行4首列</td>
        <td>行4</td>
        <td>行4</td>
        <td>行4</td>
        <td>行4</td>
        <td>行4</td>
      </tr>
      <tr>
        <td>行5首列</td>
        <td>行5</td>
        <td>行5</td>
        <td>行5</td>
        <td>行5</td>
        <td>行5</td>
      </tr>
    </table>
    </body>
    </html>
    另外,我 以前还看到过另外几种简单的方式,等以后有空再把它们找回来。

    发表于 @ 2007年10月06日 21:56:00|评论(loading...)|编辑

    新一篇: 第1次尝试div+css进行两栏式页面布局就遇到了IE的3px问题 | 旧一篇: 谁说80后的人不负责任!

    评论

    #tyb0914 发表于2008-07-09 17:39:54  IP: 61.164.40.*
    谢谢,baidu到你的页面,对我的帮助很大
    发表评论  


    当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
    Csdn Blog version 3.1a
    Copyright © 张孝祥