Results 1 to 2 of 2

Thread: SElect Box

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 1999
    Posts
    8
    Does anyone know the property in JavaScript for the selected item appearing in a select box?

  2. #2
    Lively Member chrisgaddy's Avatar
    Join Date
    Mar 2001
    Location
    Olive Branch, MS
    Posts
    71
    Here you go...

    Code:
    <form name="frmSelect">
       <select name="txtSelect">
          <option value="10">10</option>
          <option value="20">20</option>
          <option value="30">30</option>
          <option value="40">40</option>
       </select><input type="button" onclick="getVal();">
    </form>
    
    <script language="javascript">
      function getVal()
       {
          alert(document.frmSelect.txtSelect.value);
       }
    </script>
    Hope this helps. Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width