Ändern Sie die Farbe der <div> mit onMouseover

Im Versuch, ändern Sie die Farbe des div mit omMouse ove Event-handler.
Von Grau zu schwarz
Aber es funktioniert nicht.

Was läuft hier falsch ?
Auch wie zu verwenden onHover und onMouseout ?

<html>

<head>
    <title></title>
    <link type="text/css" href="" />
    <script type="text/javascript" src="" ></script>    
    <style>
        div{
            height: 100px;
            width: 100px;
            background-color: grey;
        }
    </style>

</head>

<body>
    <div onMouseover="this.bgColor = '#FFFFFF'">

    </div>
</body>

<script>

</script>
</html>
InformationsquelleAutor Harish R | 2014-01-19
Schreibe einen Kommentar