issue255.html 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>Issue 255</title>
  5. <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
  6. <script src="js/jquery-1.6.2-min.js"></script>
  7. </head>
  8. <body>
  9. <form>
  10. <label for="foo_select">Foo</label>
  11. <select name="foo_select" id="foo_select">
  12. <option value="1" selected="selected">Option 1</option>
  13. <option value="2">Option 2</option>
  14. <option value="3">Option 3</option>
  15. </select>
  16. <input type="checkbox" id="foo_check" />
  17. <input type="submit" />
  18. <p id="output_foo_select"></p>
  19. <p id="output_foo_check"></p>
  20. </form>
  21. <script type="text/javascript">
  22. (function() {
  23. $('#foo_select').change(function () {
  24. $('#output_foo_select').text("onChangeSelect");
  25. });
  26. $('#foo_check').change(function () {
  27. $('#output_foo_check').text("onChangeCheck");
  28. });
  29. })();
  30. </script>
  31. </body>
  32. </html>