• 03-05-2007, 19:26:31
    #1
    arkadaşlar dreamweaverda site yapıyorum.. Menü için Tablo oluşturdum Linkler var.. maus ile o tablonun üzerine gelindiğinde o tablonun rengi değişmesini istiyorum.. nasıl yapılıyor o? neler yapmam gerekiyor?? yardımlarınızı bekliyorum.
  • 09-05-2007, 11:41:51
    #2
    Üyeliği durduruldu
    Şu kodu <head></head> arasına al:
    <script type="text/javascript">
     
    //Specify highlight behavior. "TD" to highlight table cells, "TR" to highlight the entire row:
    var highlightbehavior="TD"
    var ns6=document.getElementById&&!document.all
    var ie=document.all
    function changeto(e,highlightcolor){
    source=ie? event.srcElement : e.target
    if (source.tagName=="TABLE")
    return
    while(source.tagName!=highlightbehavior && source.tagName!="HTML")
    source=ns6? source.parentNode : source.parentElement
    if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
    source.style.backgroundColor=highlightcolor
    }
    function contains_ns6(master, slave) { //check if slave is contained by master
    while (slave.parentNode)
    if ((slave = slave.parentNode) == master)
    return true;
    return false;
    }
    function changeback(e,originalcolor){
    if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")||source.tagName=="TABLE")
    return
    else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
    return
    if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
    source.style.backgroundColor=originalcolor
    }
    </script>
    Şu şekilde kullanabilirsin artık.
    <table onMouseover="changeto(event, 'lightgreen')" onMouseout="changeback(event, 'white')">
    "
    "
    </table>
  • 09-05-2007, 18:07:41
    #3
    Üyeliği durduruldu
    buna gerek yok

     
    <table>
    <tr>
    <td bgcolor="blue" onmouseover="this.style.backgroundColor='#ffffcc';" onMouseout="this.style.backgroundColor='#ccccff';">
    </td>
    </tr>
    </table>
  • 09-05-2007, 18:41:28
    #4
    Üyeliği durduruldu
    yazdığınız kod </table> kodu düzelttiğim halde çalışmadı ama???
  • 09-05-2007, 19:27:54
    #5
    Üyeliği durduruldu
    kodu düzelttim özür dilerim...
    3 gün uyumayan adamdan daha ne beklersin
  • 09-05-2007, 21:35:52
    #6
    Üyeliği durduruldu
    hepimizin ortak sorunu kardeşim uykusuzluk
    iyi paylaşımlar diliorum