Hello all,
I'm a beginner. I used below code to change style of a link. But it doesnot work in Opera.
the script function is
Can anyone tell me the way to change the style of a link in Opera (4+). Thanks
I'm a beginner. I used below code to change style of a link. But it doesnot work in Opera.
Code:
<span id="id1" style="POSITION: relative; TOP: 17px"> <A STYLE="COLOR: green; TEXT-DECORATION: none" href ="http://mail.yahoo.com" onmouseover ="nrollIn('Test Link change','id1',this.href,'green','blue')" >Test Link change</A> </span>
Code:
function nrollIn(text,spName,href,oColor,nColor) { swapColor(text,spName,href,oColor,nColor,true); } function nrollOut(text,spName,href,oColor,nColor) { swapColor(text,spName,href,oColor,nColor,false); } function swapColor(text,spName,href,oColor,nColor, over) { var str = "<A HREF='" + href + "'"; if (over) { str+=" STYLE='TEXT-DECORATION:underline; color:"+nColor+"'"; str += " onmouseout =\"nrollOut('" + text+ "','"+spName+"',this.href,'"+nColor+"','"+oColor+"')\" >"; } else { str+=" STYLE='TEXT-DECORATION:none; color:"+nColor+"'"; str += " onmouseover =\"nrollIn('" + text+ "','"+spName+"',this.href,'"+nColor+"','"+oColor+"')\"\" >"; } str += text + "</A>"; display(spName, str); } // function 2 function display(id, str) { if (document.layers){ with (document[id].document) { open(); write(str); close(); } } else if (document.all) { document.all[id].innerHTML = str; } else { document.getElementById(id).innerHTML = str; } }