Phiên bản đầy đủ: jsB@nk » Liên kết » Liên kết đổi màu khi rê chuột
URL: https://www.javascriptbank.com/change-color-onmouseover-link.html
Một đoạn mã JavaScript khác để tạo hiệu ứng liên kết đổi màu khi rê con trỏ chuột vào/ra.
Phiên bản đầy đủ: jsB@nk » Liên kết » Liên kết đổi màu khi rê chuột
URL: https://www.javascriptbank.com/change-color-onmouseover-link.html
<style type="text/css">.view_example{text-align: center;width: 100%;background-color: silver;border: 1px solid silver;}</style><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<script language="JavaScript"><!--// By Jari Aarniala [[email protected]]if(navigator.appName == "Microsoft Internet Explorer" &&parseInt(navigator.appVersion) >= 4){ ie4 = true;}else { ie4 = false;}function changeColor(){ if(ie4){ what = window.event.srcElement; if(what.className == "link"){ if(what.style.color == "green"){ what.style.color = "lime"; } else { what.style.color = "green"; } } else {} }}document.onmouseover = changeColor;document.onmouseout = changeColor;// --></script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<a href="http://www.yahoo.com/" style="color: green; text-decoration: none; font-family: Verdana,Arial; font-weight: 700;" class="link">Yahoo!</a> <a href="http://www.altavista.digital.com/" style="color: green; text-decoration: none; font-family: Verdana,Arial; font-weight: 700;" class="link">Altavista</a> <a href="http://www.lycos.com/" style="color: green; text-decoration: none; font-family: Verdana,Arial; font-weight: 700;" class="link">Lycos</a> <a href="http://www.infoseek.com/" style="color: green; text-decoration: none; font-family: Verdana,Arial; font-weight: 700;" class="link">Infoseek</a><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->