给你个例子:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 2</title>
<script language=javascript> 
function displayelement()
{
selectid=document.all.control.selectedIndex;
if (document.all.control.options[selectid].value=="abcde")
{
   document.all.abcde.style.display="block";
   document.all.button.style.display="none";
}
else
{
   document.all.button.style.display="block";
   document.all.abcde.style.display="none";
}
}
</script>
</head><body><form method="POST" action="--WEBBOT-SELF--">
  <p><select size="1" name="control" onchange="displayelement();">
    <option value="abcde">abcde</option>
    <option>button</option>
  </select>
  <input type="text" name="button" size="20"  style="display:none"> 
  <select size="1" name="abcde"  style="display:none"> 
    <option value="a">a</option>
    <option value="b">b</option>
    <option value="c">c</option>
  </select></p>
</form>
</body>
</html>