<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>标题1文档</title>
    <style>
        #div1 {
            width: 200px;
            height: 200px;
            background: red;
        }
    </style>
</head>

<body>
    <div id="div1" onmouseover="document.getElementById('div1').style.width='300px';
document.getElementById('div1').style.height='300px';
document.getElementById('div1').style.background='green';" onmouseout="document.getElementById('div1').style.width='200px';
document.getElementById('div1').style.height='200px';
document.getElementById('div1').style.background='red';">
    </div>

</body>

</html>