<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页</title>
<style type="text/css">
#mylayer div{
display:none;
}
</style>
</head>
<body>
<select id="sel" onchange="f(this);">
<option>a</option>
<option>b</option>
<option>c</option>
<option>d</option>
</select>
<div id="mylayer">
<div style="display:block;">层1</div>
<div>层2</div>
<div>层3</div>
<div>层4</div>
</div>
<script language="javascript">
function f(obj){
var mylayers = document.getElementById("mylayer").getElementsByTagName("DIV");

for(var i=0; i<mylayers.length; i++){
mylayers[i].style.display = "none";
}
mylayers[obj.selectedIndex].style.display = "block";
}
</script>
</body>
</html>