22. juni 2002 - 11:04Der er
5 kommentarer og 3 løsninger
Kan I give mig koden?
På http://www.wanna-save.com/ er der oppe til højre en menu (interesser, telefoni, kalender og spil). Når man kører musen over disse skifter menupunkterne farve på en fadene måde.
Er der nogen der kan fortælle mig hvordan man gør det?
<body onLoad="self.focus()"> <script language=JavaScript> var ft ft = false function fmouseoff(n, c) { if (document.all) { if (c == "#FFFFFF"){ t = setTimeout("setColor('fane', " + n + ", '#C9CACB')",120) t = setTimeout("setColor('fane', " + n + ", '#D5D6D6')",170) t = setTimeout("setColor('fane', " + n + ", '#E1E2E2')",220) t = setTimeout("setColor('fane', " + n + ", '#EFEFEF')",270) t = setTimeout("setColor('fane', " + n + ", '#FFFFFF')",320) }else{ t = setTimeout("setColor('fane', " + n + ", '#A3AEB8')",120) t = setTimeout("setColor('fane', " + n + ", '#869DB0')",170) t = setTimeout("setColor('fane', " + n + ", '#6C8DA9')",220) t = setTimeout("setColor('fane', " + n + ", '#527DA2')",270) t = setTimeout("setColor('fane', " + n + ", '#3C6F9C')",320) } } }
function fsetColor(n, c) { if (lastn != n) document.all["fane" + n].style.backgroundColor=c //document.all["fane5"].style.backgroundColor='Gold' }
lastn = -1 function faneRoll(c,i,n){ if (document.all){ if (i==1){ lastn = n document.all["fane" + n].style.backgroundColor = c } if (i==0){ lastn = -1 fmouseoff(n, c) } } }
//function xfaneRoll(c,n){ // if (document.all) document.all["fane" + n].style.backgroundColor = c // }
</tr></table> <script language=JavaScript> var t t = false function mouseoff(n) { if (document.all) { t = setTimeout("setColor('tr', " + n + ", '#FFC900')",120) t = setTimeout("setColor('tr', " + n + ", '#FFBF00')",170) t = setTimeout("setColor('tr', " + n + ", '#FFB400')",220) t = setTimeout("setColor('tr', " + n + ", '#FFAA00')",270) t = setTimeout("setColor('tr', " + n + ", '#FE9A02')",320) } } function setColor(st, n, c) { if (lastn != n) document.all[st + n].style.backgroundColor = c //document.all["fane5"].style.backgroundColor='Gold' //document.all["fane5"].style.textColor='black' } lastn = -1 function menuRoll(i,n){ if (document.all){ if (i==1){ lastn = n document.all["tr" + n].style.backgroundColor = '#FFD700' } if (i==0){ lastn = -1 mouseoff(n) } //if (i==0) document.all["tr" + n].style.backgroundColor = '#FE9A02' } }
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.