http://expert.csdn.net/Expert/topic/2457/2457948.xml?temp=.2880823

解决方案 »

  1.   

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body>
    <form name="frm" method="post" action="">
      <p>
        <select name="messagePick" onChange="messageReveal()" style="display:none">
    <option value="0">The Menu Message
    <option>Seen this before?
    <option>Possible uses?
    <option>Shares Information
    <option>Saves space
    <option>Get the code!
        </select>
      </p>
      <p> 
        <input type="text" name="messageField" size="100" onClick="test()">
      </p>
    </form>
    </body>
    </html>
    <script language="JavaScript">
    var messages = new Array(6); 
    messages[0] = "";
    messages[1] = "Have you ever seen anything like this before?";
    messages[2] = "Can you imagine how you could use it on your site?";    
    messages[3] = "It's great for sharing lots of information.";
    messages[4] = "And doesn't take up much space! ";
    messages[5] = "So, get the code and put it on your site!";function test()
    {
    frm.messagePick.style.display="";
    frm.messagePick.disabled=false;
    }function messageReveal()
    {
    var messageindex = document.frm.messagePick.selectedIndex
    document.frm.messageField.value = messages[messageindex];
    }
    </script>
      

  2.   

    看看http://fason.nease.net里有一个下拉菜单,是不是你想要的