Phiên bản đầy đủ: jsB@nk » Liên kết » Liên kết đổi chữ khi rê chuột
URL: https://www.javascriptbank.com/dynamic-change-of-linktexts-onmouseover.html
Hiệu ứng làm cho liên kết biến thành chữ khác khi ta rê con trỏ chuột đến.
Phiên bản đầy đủ: jsB@nk » Liên kết » Liên kết đổi chữ khi rê chuột
URL: https://www.javascriptbank.com/dynamic-change-of-linktexts-onmouseover.html
<SCRIPT language=JavaScript> // CREDITS:// Dynamic change of linktexts onMouseOver// by Urs Dudli and Peter Gehrig // Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.var oldtextvar newtextvar newlinkfunction shownewtext(thislink,thistext) { if (document.all) { newlink=eval("document.getElementById('"+thislink+"')") newtext=thistext oldtext=newlink.childNodes[0].nodeValue newlink.childNodes[0].nodeValue=thistext; }}function showoldtext() { if (document.all) { newlink.childNodes[0].nodeValue=oldtext; }} </SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
Just move your cursor over any <a name="whatasillyname" onmouseout="showoldtext()" onmouseover="shownewtext(this.name,'JSBank')" target="_blank" href="http://JavaScriptBank.com">textlink</a> inside this webpage and the text of the link will change dynamically.<br><br>If you leave the link the <a name="lousyname" onmouseout="showoldtext()" onmouseover="shownewtext(this.name,'JSBank')" target="_blank" href="http://JavaScriptBank.com">original text</a> will appear again.<!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->