实现按下enter键切换到下一行
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
body{
background-image: url(cool-background.png);
background-repeat: no-repeat;
background-position: 0%,0%;
background-size:cover;
margin: 0;
}
</style>
</head>
<body>
<h1>隐藏式菜单</h1>
<hr width="100%">
<div id="t"><h2>招生就业</h2></div>
<div id="tt"><h3>招聘信息</h3>
<h3>就业信息</h3>
</div>
<script>
var div = document.getElementById("t");
div.onmouseover=function(){
document.getElementById("tt").style.display="block";
}
div.onmouseout=function(){
document.getElementById("tt").style.display = "none";
}
</script>
</body>
</html>