Pawel: nochmal dynamisches CSS mit JavaScript

Beitrag lesen

Hallo Andreas,

1. Der Funktionsname darf nicht gleich mit der ID sein.
2. onmouseover="..." wird in diesem Fall nicht funktionieren. Einführungszeichen müssen weg!

--------------------

<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>menu - test</title>
<style type="text/css" media="screen"><!--
#button1     { color: white; font-weight: bold; font-size: 10px; font-family: Verdana; text-decoration: none; background-color: #ffa07a; padding: 3px; border-style: solid; border-width: 2px; border-color: #808080 black black #808080; position: absolute; z-index: 2; top: 25px; left: 25px; width: 120px; visibility: visible; display: block }
--></style>

<script type="text/javascript"><!--
function MO_button1() {
button1.style.BorderBottomColor='red';
button1.style.borderRightColor='red';
}
// -->
</script>

</head>
<body bgcolor="#dcdcdc" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
<div id="button1" onmouseover="javascript:MO_button1()">Button1</div>
</body>
</html>

--------------------

Gruß, Pawel
http://www.pkworld.de