Bug Tracker

Ticket #4047: test-4047.html

File test-4047.html, 764 bytes (added by dmethvin, 13 years ago)

Working example

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3<head>
4  <script src="jquery-1.3.1.js"></script>
5 
6  <script>
7  $(document).ready(function(){
8
9$("#testSelect").change(function(){
10  alert($("div[id='testDiv'] select[id='testSelect']").val())
11  alert($("#testDiv").find("#testSelect").val())
12  alert($("#testSelect").val())
13});
14
15  });
16  </script>
17  <style>
18
19  </style>
20</head>
21<style>
22
23</style>
24<body>
25
26<div id="testDiv">
27 <select id="testSelect"> 
28  <option value="1">One</option>
29  <option value="2">Two</option>
30 </select>
31 <input type="button" id="testBtn" value="Test">
32</div> 
33
34</body>
35</html>