한국어
<style> a:hover{color:#036;} </style> <script 언어="javascript"> var rate = 20; var obj; var 행위 = 0; var 느릅나무 = 0; var elmS = 128; var elmV = 255; var clrOrg; var 타이머ID; if (navigator.appName.indexOf("Microsoft",0) != -1 &&parseInt(navigator.appVersion) >= 4) { Browser = true; } else { 브라우저 = false; } if (브라우저) { document.onmouseover = doRainbowAnchor; document.onmouseout = stopRainbowAnchor; } function doRainbow() { if (브라우저 && act != 1) { act = 1; obj = event.srcElement; clrOrg = obj.style.color; TimerID = setInterval("ChangeColor()",100); } } function stopRainbow() { if (브라우저 && act != 0) { obj.style.color = clrOrg; ClearInterval(TimerID); 행위 = 0; } } function doRainbowAnchor() { if (Browser && act != 1) { obj = event.srcElement; while (obj.tagName != 'A' && obj.tagName != 'BODY') { obj = obj.parentElement; if (obj.tagName == 'A' || obj.tagName == 'BODY') break; } if (obj.tagName == 'A' && obj.href != '') { act = 1; clrOrg = obj.style.color; TimerID = setInterval("ChangeColor()",100); } } } function stopRainbowAnchor() { if (Browser && act != 0) { if (obj.tagName == 'A') { obj.style.color = clrOrg; ClearInterval(TimerID); 행위 = 0; } } } function ChangeColor() { obj.style.color = makeColor(); } 함수 makeColor() { if (elmS == 0) { elmR = elmV; elmG = elmV; elmB = elmV; } else { t1 = elmV; t2 = (255 - elmS) * elmV / 255; t3 = 느릅나무 % 60; t3 = (t1 - t2) * t3 / 60; if (elmH < 60) { elmR = t1; 엘름B = t2; 느릅나무G = t2 + t3; } else if (elmH < 120) { elmG = t1; 엘름B = t2; 느릅나무R = t1 - t3; } else if (elmH < 180) { elmG = t1; 느릅나무R = t2; elmB = t2 + t3; } else if (elmH < 240) { elmB = t1; 느릅나무R = t2; elmG = t1 - t3; } else if (elmH < 300) { elmB = t1; 느릅나무G = t2; 느릅나무R = t2 + t3; } else if (elmH < 360) { elmR = t1; 느릅나무G = t2; elmB = t1 - t3; } else { elmR = 0; 느릅나무G = 0; 엘름B = 0; } } elmR = Math.floor(elmR); elmG = Math.floor(elmG); elmB = Math.floor(elmB); clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16); elmH = elmH + 속도; if (elmH >= 360) elmH = 0; clrRGB를 반환합니다. } </script><div> <a href="##">鼠标移到这里观看效果</a> </div>