copy change event to keyup
Hi
I'm fairly new to jquery, I'm in a situation where I need to copy the onchange event handler to the onkeyup event handler for a select statement. Can anyone offer a way to do this using jquery?
- <html>
- <head>
- <title>onchange test case</title>
<script src=https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js></script>
- </head>
- <body>
- <form>
- <select id="testonchange">
- <option>option1</option>
- <option>option2</option>
- <option>option3</option>
- </select>
- <button>bla</button>
- </form>
- <script>
- $("#testonchange").change(function ()
- {
- alert("onchange activated");
- });
- </script>
- </body>
- </html>