[TableEvenOdd.htm]



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

    <title>짝수행과 홀수행의 배경색 변경</title>

    <style type="text/css">

        .odd { background-color:Silver; }

        .Even { background-color : Aqua; }

    </style>

    <script src="../../js/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>

    <script type="text/javascript">

        $(document).ready(function() {

            $('table.tbl tbody tr:odd').addClass('odd');

            $('table.tbl tbody tr:even').addClass('Even');

        });

    </script>

</head>

<body>

    <table class="tbl" border="1">

        <thead>

            <tr>

                <th>&nbsp;</th>

                <th>제목</th>

                <th>저자</th>

                <th>출간일</th>

                <th>가격</th>

            </tr>

        </thead>

        <tbody>

            <tr>

                <td><img src="../../ProductImages/thumbs/BOOK-01.jpg" /></td>

                <td>쉽게 배우는 ASP.NET 2.0</td>

                <td>박용준</td>

                <td>2008</td>

                <td>20000</td>

            </tr>

            <tr>

                <td><img src="../../ProductImages/thumbs/COM-01.jpg" /></td>

                <td>.NET Bible</td>

                <td>박용준</td>

                <td>2003</td>

                <td>25000</td>

            </tr>

            <tr>

                <td><img src="../../ProductImages/thumbs/HARDWARE-01.jpg" /></td>

                <td>정보처리기능사</td>

                <td>박용준</td>

                <td>2000</td>

                <td>18000</td>

            </tr>

        </tbody>

    </table>

</body>

</html>

 



-------------------------------------------------------------------------------------


 

[실행결과]




 


 

Posted by holland14
: