::綠細胞雜誌::

Would you like to react to this message? Create an account in a few clicks or log in to continue.

紀錄生活一切雜事


    超簡單表格隔行換色與鼠標經過變色

    grass0423
    grass0423
    Admin


    文章數 : 122
    注冊日期 : 2010-02-23

    超簡單表格隔行換色與鼠標經過變色 Empty 超簡單表格隔行換色與鼠標經過變色

    發表  grass0423 周五 1月 28, 2011 4:12 pm

    超簡單表格隔行換色與鼠標經過變色 W2008110

    代碼:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="utf-8" />
    <style type="text/css"><!--
    #senfe {
       width: 300px;
       border-top: #000 1px solid;
       border-left: #000 1px solid;
    }
    #senfe td {
       border-right: #000 1px solid;
       border-bottom: #000 1px solid;
    }
    --></style>
    <script language="javascript"><!--
    function senfe(o,a,b,c,d){
       var t=document.getElementById(o).getElementsByTagName("tr");
       for(var i=0;i<t.length;i++){
          t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
          t[i].onclick=function(){
             if(this.x!="1"){
                this.x="1";//本來打算直接用背景色判斷,FF獲取到的背景是RGB值,不好判斷
                this.style.backgroundColor=d;
             }else{
                this.x="0";
                this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
             }
          }
          t[i].onmouseover=function(){
             if(this.x!="1")this.style.backgroundColor=c;
          }
          t[i].onmouseout=function(){
             if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
          }
       }
    }
    --></script>
    </head>
    <body>
    <table border="0" cellpadding="0" cellspacing="0" id="senfe">
    <tr><td> </td><td> </td><td> </td><td> </td></tr>
    <tr><td> </td><td> </td><td> </td><td> </td></tr>
    <tr><td> </td><td> </td><td> </td><td> </td></tr>
    <tr><td> </td><td> </td><td> </td><td> </td></tr>
    <tr><td> </td><td> </td><td> </td><td> </td></tr>
    <tr><td> </td><td> </td><td> </td><td> </td></tr>
    <tr><td> </td><td> </td><td> </td><td> </td></tr>
    <tr><td> </td><td> </td><td> </td><td> </td></tr>
    <tr><td> </td><td> </td><td> </td><td> </td></tr>
    <tr><td> </td><td> </td><td> </td><td> </td></tr>
    </table>
    <script language="javascript"><!--
    //senfe("表格名稱","奇數行背景","偶數行背景","鼠標經過背景","點擊後背景");
    senfe("senfe","#fff","#ccc","#cfc","#f00");
    --></script>
    </body>


    超簡單表格隔行換色與鼠標經過變色 V2008110
    代碼:
    <style type="text/css"><!--
    #senfe {
       width: 650px;
       border-top: #E3E3E3 1px solid;
       border-left: #E3E3E3 1px solid;
    }
    #senfe td {
       padding: 5px;border-right: #E3E3E3 1px solid;
       border-bottom: #E3E3E3 1px solid;
    }
    #senfe2 {
       width: 650px;
       border-top: #E3E3E3 1px solid;
       border-left: #E3E3E3 1px solid;
    }
    #senfe2 td {
       padding: 5px;border-right: #E3E3E3 1px solid;
       border-bottom: #E3E3E3 1px solid;
    }
    --></style>
    <script language="javascript"><!--
    function senfe(o,a,b,c,d){
       var t=document.getElementById(o).getElementsByTagName("tr");
       for(var i=0;i<t.length;i++){
          t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
          t[i].onclick=function(){
             if(this.x!="1"){
                this.x="1";//本來打算直接用背景色判斷,FF獲取到的背景是RGB值,不好判斷
                this.style.backgroundColor=d;
             }else{
                this.x="0";
                this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
             }
          }
          t[i].onmouseover=function(){
             if(this.x!="1")this.style.backgroundColor=c;
          }
          t[i].onmouseout=function(){
             if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
          }
       }
    }
    --></script>
        <P><TABLE id="senfe" cellSpacing=0 cellPadding=0 width="650px" border=0>
      <TBODY>
      <TR>
        <TD colSpan=7><H3 id=about2>電子雜誌製作價格表</H3></TD></TR>
      <TR>
        <TD width="12%">版 本</TD>
        <TD width="12%">簡易版</TD>
        <TD width="13%">普及版</TD>
        <TD width="13%">標準版</TD>
        <TD width="14%">專業版</TD>
        <TD width="15%">創意版</TD>
        <TD width="15%">經典版</TD>
      </TR>
      <TR>
        <TD>製作週期</TD>
        <TD>5天以內</TD>
        <TD>10天以內</TD>
        <TD>10天-15天</TD>
        <TD>30天-45天</TD>
        <TD>與客戶另行協商</TD>
        <TD>與客戶另行協商</TD>
      </TR>
      <TR>
        <TD colspan="7">    <p style="color:red">如果客戶長期期刊製作合作,價格將更加優惠。</p></TD>
        </TR>
      </TBODY></TABLE>
        <TABLE id="senfe2" cellSpacing=0 cellPadding=0 width="650px"
    border=0>
          <TBODY>
            <TR>
              <TD colSpan=3><H3 id=about2>電子雜誌製作單項價格表</H3></TD></TR>
            <TR>
              <TD width="12%">單項項目</TD>
            <TD width="26%">單價</TD>
            <TD width="46%">備註</TD>
            </TR>
            <TR>
              <TD>專業配音</TD>
            <TD>面議</TD>
            <TD>專業錄音棚+專業錄音員,看配音內容多少而定</TD>
            </TR>
            <TR>
              <TD>專業拍攝</TD>
            <TD>面議</TD>
            <TD>專業攝影看客戶需求而定</TD>
            </TR>
          </TBODY>
        </TABLE>
        </P>
      </LI>
    </UL>
    </DIV></DIV></DIV>
    <script language="javascript"><!--
    //senfe("表格名稱","奇數行背景","偶數行背景","鼠標經過背景","點擊後背景");
    senfe("senfe","#fff","#F5F5F5","#FFFFCC","#FFFF84");
    //senfe("表格名稱","奇數行背景","偶數行背景","鼠標經過背景","點擊後背景");
    senfe("senfe2","#fff","#F5F5F5","#FFFFCC","#FFFF84");
    --></script>

      現在的時間是 周四 9月 19, 2024 10:34 am