jquery core: closes #2652. val() supports option elements, also simplified the code.
[jquery.git] / test / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" id="html">
3 <head>
4         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5         <title>jQuery Test Suite</title>
6         <link rel="Stylesheet" media="screen" href="data/testsuite.css" />
7         <!-- Includes -->
8         <script type="text/javascript">
9                 var jQuery = this.jQuery || "jQuery", // For testing .noConflict()
10                         $ = this.$ || "$",
11                         originaljQuery = jQuery,
12                         original$ = $;
13         </script>
14         <script type="text/javascript" src="../dist/jquery.js"></script>
15         <script type="text/javascript" src="data/testrunner.js"></script>
16         <script type="text/javascript" src="unit/core.js"></script>
17         <script type="text/javascript" src="unit/dimensions.js"></script>
18         <script type="text/javascript" src="unit/selector.js"></script>
19         <script type="text/javascript" src="unit/event.js"></script>
20         <script type="text/javascript" src="unit/ajax.js"></script>
21         <script type="text/javascript" src="unit/fx.js"></script>
22 </head>
23
24 <body id="body">
25         <h1 id="header">jQuery Test Suite</h1>
26         <h2 id="banner"></h2>
27         <h2 id="userAgent"></h2>
28         
29         <!-- Test HTML -->
30         <div id="nothiddendiv" style="height:1px;background:white;">
31                 <div id="nothiddendivchild"></div>
32         </div>
33         <!-- this iframe is outside the #main so it won't reload constantly wasting time, but it means the tests must be "safe" and clean up after themselves -->
34         <iframe id="loadediframe" name="loadediframe" style="display:none;" src="data/iframe.html"></iframe>
35         <dl id="dl" style="display:none;">
36         <div id="main" style="display: none;">
37                 <p id="firstp">See <a id="simon1" href="http://simon.incutio.com/archive/2003/03/25/#getElementsBySelector" rel="bookmark">this blog entry</a> for more information.</p>
38                 <p id="ap">
39                         Here are some links in a normal paragraph: <a id="google" href="http://www.google.com/" title="Google!">Google</a>, 
40                         <a id="groups" href="http://groups.google.com/">Google Groups</a>. 
41                         This link has <code><a href="http://smin" id="anchor1">class="blog"</a></code>: 
42                         <a href="http://diveintomark.org/" class="blog" hreflang="en" id="mark">diveintomark</a>
43
44                 </p>
45                 <div id="foo">
46                         <p id="sndp">Everything inside the red border is inside a div with <code>id="foo"</code>.</p>
47                         <p lang="en" id="en">This is a normal link: <a id="yahoo" href="http://www.yahoo.com/" class="blogTest">Yahoo</a></p>
48                         <p id="sap">This link has <code><a href="#2" id="anchor2">class="blog"</a></code>: <a href="http://simon.incutio.com/" class="blog link" id="simon">Simon Willison's Weblog</a></p>
49
50                 </div>
51                 <p id="first">Try them out:</p>
52                 <ul id="firstUL"></ul>
53                 <ol id="empty"></ol>
54                 <form id="form" action="formaction">
55                         <input type="text" name="action" value="Test" id="text1" maxlength="30"/>
56                         <input type="text" name="text2" value="Test" id="text2" disabled="disabled"/>
57                         <input type="radio" name="radio1" id="radio1" value="on"/>
58
59                         <input type="radio" name="radio2" id="radio2" checked="checked"/>
60                         <input type="checkbox" name="check" id="check1" checked="checked"/>
61                         <input type="checkbox" id="check2" value="on"/>
62
63                         <input type="hidden" name="hidden" id="hidden1"/>
64                         <input type="text" style="display:none;" name="foo[bar]" id="hidden2"/>
65                         
66                         <input type="text" id="name" name="name" value="name" />
67                         
68                         <button id="button" name="button">Button</button>
69                         
70                         <textarea id="area1" maxlength="30">foobar</textarea>
71                         
72                         <select name="select1" id="select1">
73                                 <option id="option1a" class="emptyopt" value="">Nothing</option>
74                                 <option id="option1b" value="1">1</option>
75                                 <option id="option1c" value="2">2</option>
76                                 <option id="option1d" value="3">3</option>
77                         </select>
78                         <select name="select2" id="select2">
79                                 <option id="option2a" class="emptyopt" value="">Nothing</option>
80                                 <option id="option2b" value="1">1</option>
81                                 <option id="option2c" value="2">2</option>
82                                 <option id="option2d" selected="selected" value="3">3</option>
83                         </select>
84                         <select name="select3" id="select3" multiple="multiple">
85                                 <option id="option3a" class="emptyopt" value="">Nothing</option>
86                                 <option id="option3b" selected="selected" value="1">1</option>
87                                 <option id="option3c" selected="selected" value="2">2</option>
88                                 <option id="option3d" value="3">3</option>
89                                 <option id="option3e">no value</option>
90                         </select>
91                         
92                         <object id="object1" codebase="stupid">
93                                 <param name="p1" value="x1" />
94                                 <param name="p2" value="x2" />
95                         </object>
96                         
97                         <span id="台北Táiběi"></span>
98                         <span id="台北" lang="中文"></span>
99                         <span id="utf8class1" class="台北Táiběi 台北"></span>
100                         <span id="utf8class2" class="台北"></span>
101                         <span id="foo:bar" class="foo:bar"></span>
102                         <span id="test.foo[5]bar" class="test.foo[5]bar"></span>
103                         
104                         <foo_bar id="foobar">test element</foo_bar>
105                 </form>
106                 <b id="floatTest">Float test.</b>
107                 <iframe id="iframe" name="iframe"></iframe>
108                 <form id="lengthtest">
109                         <input type="text" id="length" name="test"/>
110                         <input type="text" id="idTest" name="id"/>
111                 </form>
112                 <table id="table"></table>
113                 
114                 <div id="fx-queue">
115                         <div id="fadein" class='chain test'>fadeIn<div>fadeIn</div></div>
116                         <div id="fadeout" class='chain test out'>fadeOut<div>fadeOut</div></div>
117                         
118                         <div id="show" class='chain test'>show<div>show</div></div>
119                         <div id="hide" class='chain test out'>hide<div>hide</div></div>
120                         
121                         <div id="togglein" class='chain test'>togglein<div>togglein</div></div>
122                         <div id="toggleout" class='chain test out'>toggleout<div>toggleout</div></div>
123                 
124                         
125                         <div id="slideup" class='chain test'>slideUp<div>slideUp</div></div>
126                         <div id="slidedown" class='chain test out'>slideDown<div>slideDown</div></div>
127                         
128                         <div id="slidetogglein" class='chain test'>slideToggleIn<div>slideToggleIn</div></div>
129                         <div id="slidetoggleout" class='chain test out'>slideToggleOut<div>slideToggleOut</div></div>
130                 </div>
131                 
132                 <div id="fx-tests"></div>
133
134                 <form id="testForm" action="#" method="get">
135                         <textarea name="T3" rows="2" cols="15">?
136 Z</textarea>
137                         <input type="hidden" name="H1" value="x" />
138                         <input type="hidden" name="H2" />
139                         <input name="PWD" type="password" value="" />
140                         <input name="T1" type="text" />
141                         <input name="T2" type="text" value="YES" readonly="readonly" />
142                         <input type="checkbox" name="C1" value="1" />
143                         <input type="checkbox" name="C2" />
144                         <input type="radio" name="R1" value="1" />
145                         <input type="radio" name="R1" value="2" />
146                         <input type="text" name="My Name" value="me" />
147                         <input type="reset" name="reset" value="NO" />
148                         <select name="S1">
149                                 <option value="abc">ABC</option>
150                                 <option value="abc">ABC</option>
151                                 <option value="abc">ABC</option>
152                         </select>
153                         <select name="S2" multiple="multiple" size="3">
154                                 <option value="abc">ABC</option>
155                                 <option value="abc">ABC</option>
156                                 <option value="abc">ABC</option>
157                         </select>
158                         <select name="S3">
159                                 <option selected="selected">YES</option>
160                         </select>
161                         <select name="S4">
162                                 <option value="" selected="selected">NO</option>
163                         </select>
164                         <input type="submit" name="sub1" value="NO" />
165                         <input type="submit" name="sub2" value="NO" />
166                         <input type="image" name="sub3" value="NO" />
167                         <button name="sub4" type="submit" value="NO">NO</button>
168                         <input name="D1" type="text" value="NO" disabled="disabled" />
169                         <input type="checkbox" checked="checked" disabled="disabled" name="D2" value="NO" />
170                         <input type="radio" name="D3" value="NO" checked="checked" disabled="disabled" />
171                         <select name="D4" disabled="disabled">
172                                 <option selected="selected" value="NO">NO</option>
173                         </select>
174                 </form>
175                 <div id="moretests">
176                         <form>
177                                 <div id="checkedtest" style="display:none;">
178                                         <input type="radio" name="checkedtestradios" checked="checked"/>
179                                         <input type="radio" name="checkedtestradios" value="on"/>
180                                         <input type="checkbox" name="checkedtestcheckboxes" checked="checked"/>
181                                         <input type="checkbox" name="checkedtestcheckboxes" />
182                                 </div>
183                         </form>
184                         <div id="nonnodes"><span>hi</span> there <!-- mon ami --></div>
185                         <div id="t2037">
186                                 <div><div class="hidden">hidden</div></div>
187                         </div>
188                 </div>
189         </div>
190         </dl>
191         
192         <ol id="tests"></ol>
193 </body>
194 </html>