Hallo!
Ich möchte auf meiner Page die Links auch unter Netscape bei Mouseover unterstrichen haben. Aus diesem Grunde habe ich das unten aufgeführte Javascript eingefügt.
Ich habe die Schriftgröße der Links auf 2 gesetzt, bei mouseover werden sie jedoch größer, wahrscheinlich als Standardgröße dargestellt. Wie kann ich das ändern?
Ich hoffe mir kann irgend jemand helfen, ich habe selbst nämlich keine Ahnung von JavaScript.
MfG
HeYy20
<script language="JavaScript1.2" type="text/javascript">
<!--
var oldLoad = null;
var obj = null;
var tmpLayer = null;
if (self.onload)
oldLoad = self.onload;
self.onload = HoverInit;
function HoverInit()
{
if (oldLoad) oldLoad();
if (document.layers) {
tmpLayer = new Layer(1);
tmpLayer.bgColor = document.bgColor;
document.captureEvents(Event.MOUSEOVER);
document.onmouseover = Hover;
}
}
function Hover(evt)
{
document.routeEvent(evt);
if (tmpLayer && tmpLayer.visibility == 'hide' && evt.target.text) {
obj = evt.target;
tmpLayer.left = obj.x;
tmpLayer.top = obj.y;
tmpLayer.width = 1;
with (tmpLayer.document) {
open();
write('<nobr><a href="'+obj.href+'" class="hover"' + (obj.target ? ' target="' + obj.target + '"' : '') + '>'+obj.text+'</a></nobr>');
close();
}
tmpLayer.visibility = 'show';
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = Hoveroff;
}
}
function Hoveroff(evt)
{
if (tmpLayer && evt.target != tmpLayer.document.links[0] && evt.target != obj) {
tmpLayer.visibility = 'hide';
document.releaseEvents(Event.MOUSEMOVE);
}
}
//-->
</script>
Ich möchte auf meiner Page die Links auch unter Netscape bei Mouseover unterstrichen haben. Aus diesem Grunde habe ich das unten aufgeführte Javascript eingefügt.
Ich habe die Schriftgröße der Links auf 2 gesetzt, bei mouseover werden sie jedoch größer, wahrscheinlich als Standardgröße dargestellt. Wie kann ich das ändern?
Ich hoffe mir kann irgend jemand helfen, ich habe selbst nämlich keine Ahnung von JavaScript.
MfG
HeYy20
<script language="JavaScript1.2" type="text/javascript">
<!--
var oldLoad = null;
var obj = null;
var tmpLayer = null;
if (self.onload)
oldLoad = self.onload;
self.onload = HoverInit;
function HoverInit()
{
if (oldLoad) oldLoad();
if (document.layers) {
tmpLayer = new Layer(1);
tmpLayer.bgColor = document.bgColor;
document.captureEvents(Event.MOUSEOVER);
document.onmouseover = Hover;
}
}
function Hover(evt)
{
document.routeEvent(evt);
if (tmpLayer && tmpLayer.visibility == 'hide' && evt.target.text) {
obj = evt.target;
tmpLayer.left = obj.x;
tmpLayer.top = obj.y;
tmpLayer.width = 1;
with (tmpLayer.document) {
open();
write('<nobr><a href="'+obj.href+'" class="hover"' + (obj.target ? ' target="' + obj.target + '"' : '') + '>'+obj.text+'</a></nobr>');
close();
}
tmpLayer.visibility = 'show';
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = Hoveroff;
}
}
function Hoveroff(evt)
{
if (tmpLayer && evt.target != tmpLayer.document.links[0] && evt.target != obj) {
tmpLayer.visibility = 'hide';
document.releaseEvents(Event.MOUSEMOVE);
}
}
//-->
</script>