What is wrong with selecting with my drop down element.

Posted by Babiker on Stack Overflow See other posts from Stack Overflow or by Babiker
Published on 2010-06-16T17:50:05Z Indexed on 2010/06/16 18:02 UTC
Read the original article Hit count: 168

Filed under:
|
<html>
    <head>
        <script type='text/javascript' language='javascript' src="http://localhost/javascript/jquery-1.4.2.js">
        </script>

        <script type='text/javascript' language='javascript'>
        $(document).ready(function(){
            $("#button").mousedown(function(){
                    dropDownMenu    = $("#dropDownMenu");
                    alert(dropDownMenu.options[0].text);
                });
        });


        </script>
    </head>
    <body>
    <select id="dropDownMenu"><option>Test</option></select><br>
    <input id="button" type="button">
    </body>
</html>

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery