Det kan kun lade sig gøre hvis du bruger lag.
Denn virker i begge:
<html>
<head>
<title></title>
<style type="text/css">
A.normal{color:blue}
A.over{color:red}A{color:Navy; text-decoration:none; font-family: Arial,sans-serif; font-size:12px;}
</style>
<script type="text/javascript" language="JavaScript">
function checkBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new checkBrowser()
function makeStyleObj(obj,nest,outtext,overtext){
nest=(!nest) ? '':'document.'+nest+'.'
this.css=(bw.ns4) ? eval(nest+'document.'+obj):document.all[obj].style;
this.ref=(bw.ns4) ? eval(nest+'document.'+obj+'.document'):eval('document');
this.css.visibility='visible'
if(bw.ns4){
this.overtext=overtext
this.outtext=outtext
this.writeIt=b_writeIt;
}
return this
}
function b_writeIt(text){
if(bw.ns4){ this.ref.write(text); this.ref.close() }
}
function change(num){
if(bw.ns4){
for(i=0;i<cLinks.length;i++){
cLinks[i].writeIt(cLinks[i].outtext)
}
cLinks[num].writeIt(cLinks[num].overtext)
}
else if(bw.ie4 || bw.ie5) event.srcElement.className='over'
}
function changeb(num){
if(bw.ns4) cLinks[num].writeIt(cLinks[num].outtext)
else if(bw.ie4 || bw.ie5) event.srcElement.className='normal'
}
function styleChangeInit(){
if(bw.ns4 || bw.ie4 || bw.ie5){
cLinks=new Array()
cLinks[0]=new makeStyleObj('divLink1',null,'<a href="
http://www.bratta.com" onmouseover="change(0)" class="normal">Link1</a>','<a href="
http://www.bratta.com" onmouseout="changeb(0)" class="over">Link1</a>')
cLinks[1]=new makeStyleObj('divLink2',null,'<a href="
http://www.bratta.com" onmouseover="change(1)" class="normal">Link2</a>','<a href="
http://www.bratta.com" onmouseout="changeb(1)" class="over">Link2</a>')
cLinks[2]=new makeStyleObj('divLink3',null,'<a href="
http://www.bratta.com" onmouseover="change(2)" class="normal">Link3</a>','<a href="
http://www.bratta.com" onmouseout="changeb(2)" class="over">Link3</a>')
cLinks[3]=new makeStyleObj('divLink4',null,'<a href="
http://www.bratta.com" onmouseover="change(3)" class="normal">Link4</a>','<a href="
http://www.bratta.com" onmouseout="changeb(3)" class="over">Link4</a>')
cLinks[4]=new makeStyleObj('divLink5',null,'<a href="
http://www.bratta.com" onmouseover="change(4)" class="normal">Link5</a>','<a href="
http://www.bratta.com" onmouseout="changeb(4)" class="over">Link5</a>')
cLinks[5]=new makeStyleObj('divLink6',null,'<a href="
http://www.bratta.com" onmouseover="change(5)" class="normal">Link6</a>','<a href="
http://www.bratta.com" onmouseout="changeb(5)" class="over">Link6</a>')
}
}
onload=styleChangeInit;
</script>
</HEAD>
<BODY bgcolor="White">
<div id="divLink1" style="left:150; position:absolute; top:300; visibility:hidden">
<a href="#" onmouseover="change(0)" class="normal" onmouseout="changeb(0)">Link1</a>
</div>
<div id="divLink2" style="left:200; position:absolute; top:300; visibility:hidden">
<a href="#" onmouseover="change(1)" class="normal" onmouseout="changeb(1)">Link2</a>
</div>
<div id="divLink3" style="left:250; position:absolute; top:300; visibility:hidden">
<a href="#" onmouseover="change(2)" class="normal" onmouseout="changeb(2)">Link3</a>
</div>
<div id="divLink4" style="left:300; position:absolute; top:300; visibility:hidden">
<a href="#" onmouseover="change(3)" class="normal" onmouseout="changeb(3)">Link4</a>
</div>
<div id="divLink5" style="left:350; position:absolute; top:300; visibility:hidden">
<a href="#" onmouseover="change(4)" class="normal" onmouseout="changeb(4)">Link5</a>
</div>
<div id="divLink6" style="left:400; position:absolute; top:300; visibility:hidden">
<a href="#" onmouseover="change(5)" class="normal" onmouseout="changeb(5)">Link6</a>
</div>
</BODY>
</HTML>