Zerberus777
Mitglied
Hallo,
warum funktioniert folgendes nur unter Firefox?
Gruß
Zerberus
warum funktioniert folgendes nur unter Firefox?
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test</title>
<style>
div {width:300px;height:200px;background-color:yellow;}
</style>
<script>
function transformiere() {
document.getElementById("selectDiv").style="background-color:red";
}
function transformiereback() {
document.getElementById("selectDiv").style="background-color:green";
}
</script>
</head>
<body>
<h4><span onmouseover="transformiere(); style='color:red'" onmouseout="transformiereback(); style='color:green'">onmouseover</span></h4>
<div id="selectDiv"></div>
</body>
</html>
Gruß
Zerberus