2.0_beta sync to rsa
[framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.1.0 / docs / forms / forms-all-native.html
1 <!DOCTYPE html>
2 <html>
3         <head>
4         <meta charset="utf-8" />
5         <meta name="viewport" content="width=device-width, initial-scale=1">
6         <title>jQuery Mobile Docs - Native Form Controls</title>
7         <link rel="stylesheet"  href="../../css/themes/default/jquery.mobile.css" />
8         <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9
10         <script src="../../js/jquery.js"></script>
11         <script src="../../docs/_assets/js/jqm-docs.js"></script>
12         <script src="../../js/"></script>
13
14 </head>
15 <body>
16
17         <div data-role="page" class="type-interior">
18
19                 <div data-role="header" data-theme="f">
20                 <h1>Forms</h1>
21                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
22                 <a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
23         </div><!-- /header -->
24
25         <div data-role="content">
26                 <div class="content-primary">
27
28                 <form action="#" method="get">
29
30                         <h2>Native form elements &amp; buttons</h2>
31
32                         <p>Although the framework automatically enhances form elements and buttons into <a href="forms-all.html">touch input optimized controls</a> to streamline development, it's easy to tell jQuery Mobile to leave these elements alone so the standard, native control can be used instead.</p>
33                         <p>Adding the <code>data-role="none"</code> attribute to any form or button element tells the framework to not apply any enhanced styles or scripting. The examples below all have this attribute in place to demonstrate the effect. You may need to write custom styles to lay out your form controls because we try to leave all the default styling intact.</p>
34
35                         <div data-role="fieldcontain">
36                  <label for="name">Text Input:</label>
37                  <input type="text" name="name" id="name" value="" data-role="none" />
38                         </div>
39
40                         <div data-role="fieldcontain">
41                         <label for="textarea">Textarea:</label>
42                         <textarea cols="40" rows="8" name="textarea" id="textarea" data-role="none"></textarea>
43                         </div>
44
45                         <div data-role="fieldcontain">
46                  <label for="search">Search Input:</label>
47                  <input type="search" name="password" id="search" value="" data-role="none" />
48                         </div>
49
50                         <div data-role="fieldcontain">
51                                 <label for="slider2">Flip switch:</label>
52                                 <select name="slider2" id="slider2" data-role="none">
53                                         <option value="off">Off</option>
54                                         <option value="on">On</option>
55                                 </select>
56                         </div>
57
58                         <div data-role="fieldcontain">
59                                 <label for="slider">Slider:</label>
60                                 <input type="range" name="slider" id="slider" value="0" min="0" max="100" data-role="none" />
61                         </div>
62
63                         <div data-role="fieldcontain">
64                         <fieldset data-role="controlgroup">
65                                 <legend>Choose as many snacks as you'd like:</legend>
66                                 <input type="checkbox" name="checkbox-1a" id="checkbox-1a" class="custom" data-role="none" />
67                                 <label for="checkbox-1a">Cheetos</label>
68
69                                 <input type="checkbox" name="checkbox-2a" id="checkbox-2a" class="custom" data-role="none" />
70                                 <label for="checkbox-2a">Doritos</label>
71
72                                 <input type="checkbox" name="checkbox-3a" id="checkbox-3a" class="custom" data-role="none" />
73                                 <label for="checkbox-3a">Fritos</label>
74
75                                 <input type="checkbox" name="checkbox-4a" id="checkbox-4a" class="custom" data-role="none" />
76                                 <label for="checkbox-4a">Sun Chips</label>
77                     </fieldset>
78                         </div>
79
80                         <div data-role="fieldcontain">
81                         <fieldset data-role="controlgroup" data-type="horizontal">
82                         <legend>Font styling:</legend>
83                         <input type="checkbox" name="checkbox-6" id="checkbox-6" class="custom" data-role="none" />
84                                 <label for="checkbox-6">b</label>
85
86                                 <input type="checkbox" name="checkbox-7" id="checkbox-7" class="custom" data-role="none" />
87                                 <label for="checkbox-7"><em>i</em></label>
88
89                                 <input type="checkbox" name="checkbox-8" id="checkbox-8" class="custom" data-role="none" />
90                                 <label for="checkbox-8">u</label>
91                     </fieldset>
92                         </div>
93
94                         <div data-role="fieldcontain">
95                             <fieldset data-role="controlgroup">
96                                 <legend>Choose a pet:</legend>
97                                         <input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked" data-role="none" />
98                                         <label for="radio-choice-1">Cat</label>
99
100                                         <input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2" data-role="none" />
101                                         <label for="radio-choice-2">Dog</label>
102
103                                         <input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3" data-role="none" />
104                                         <label for="radio-choice-3">Hamster</label>
105
106                                         <input type="radio" name="radio-choice-1" id="radio-choice-4" value="choice-4" data-role="none" />
107                                         <label for="radio-choice-4">Lizard</label>
108                             </fieldset>
109                         </div>
110
111                         <div data-role="fieldcontain">
112                             <fieldset data-role="controlgroup" data-type="horizontal">
113                                 <legend>Layout view:</legend>
114                                         <input type="radio" name="radio-choice-b" id="radio-choice-c" value="on" checked="checked" data-role="none" />
115                                         <label for="radio-choice-c">List</label>
116                                         <input type="radio" name="radio-choice-b" id="radio-choice-d" value="off" data-role="none" />
117                                         <label for="radio-choice-d">Grid</label>
118                                         <input type="radio" name="radio-choice-b" id="radio-choice-e" value="other" data-role="none" />
119                                         <label for="radio-choice-e">Gallery</label>
120                             </fieldset>
121                         </div>
122
123                         <div data-role="fieldcontain">
124                                 <label for="select-choice-1" class="select">Choose shipping method:</label>
125                                 <select name="select-choice-1" id="select-choice-1" data-role="none">
126                                         <option value="standard">Standard: 7 day</option>
127                                         <option value="rush">Rush: 3 days</option>
128                                         <option value="express">Express: next day</option>
129                                         <option value="overnight">Overnight</option>
130                                 </select>
131                         </div>
132
133                         <div data-role="fieldcontain">
134                                 <label for="select-choice-3" class="select">Your state:</label>
135                                 <select name="select-choice-3" id="select-choice-3" data-role="none">
136                                         <option>Choose...</option>
137                                         <option value="AL">Alabama</option>
138                                         <option value="AK">Alaska</option>
139                                         <option value="AZ">Arizona</option>
140                                         <option value="AR">Arkansas</option>
141                                         <option value="CA">California</option>
142                                         <option value="CO">Colorado</option>
143                                         <option value="CT">Connecticut</option>
144                                         <option value="DE">Delaware</option>
145                                         <option value="FL">Florida</option>
146                                         <option value="GA">Georgia</option>
147                                         <option value="HI">Hawaii</option>
148                                         <option value="ID">Idaho</option>
149                                         <option value="IL">Illinois</option>
150                                         <option value="IN">Indiana</option>
151                                         <option value="IA">Iowa</option>
152                                         <option value="KS">Kansas</option>
153                                         <option value="KY">Kentucky</option>
154                                         <option value="LA">Louisiana</option>
155                                         <option value="ME">Maine</option>
156                                         <option value="MD">Maryland</option>
157                                         <option value="MA">Massachusetts</option>
158                                         <option value="MI">Michigan</option>
159                                         <option value="MN">Minnesota</option>
160                                         <option value="MS">Mississippi</option>
161                                         <option value="MO">Missouri</option>
162                                         <option value="MT">Montana</option>
163                                         <option value="NE">Nebraska</option>
164                                         <option value="NV">Nevada</option>
165                                         <option value="NH">New Hampshire</option>
166                                         <option value="NJ">New Jersey</option>
167                                         <option value="NM">New Mexico</option>
168                                         <option value="NY">New York</option>
169                                         <option value="NC">North Carolina</option>
170                                         <option value="ND">North Dakota</option>
171                                         <option value="OH">Ohio</option>
172                                         <option value="OK">Oklahoma</option>
173                                         <option value="OR">Oregon</option>
174                                         <option value="PA">Pennsylvania</option>
175                                         <option value="RI">Rhode Island</option>
176                                         <option value="SC">South Carolina</option>
177                                         <option value="SD">South Dakota</option>
178                                         <option value="TN">Tennessee</option>
179                                         <option value="TX">Texas</option>
180                                         <option value="UT">Utah</option>
181                                         <option value="VT">Vermont</option>
182                                         <option value="VA">Virginia</option>
183                                         <option value="WA">Washington</option>
184                                         <option value="WV">West Virginia</option>
185                                         <option value="WI">Wisconsin</option>
186                                         <option value="WY">Wyoming</option>
187                                 </select>
188                         </div>
189
190                                 
191
192
193                         <p><strong>Button</strong> based button:</p>
194                         <button data-role="none">Button element</button>
195
196                         <p><strong>Input type="button"</strong> based button:</p>
197                         <input type="button" value="Input type=button" data-role="none" />
198
199                         <p><strong>Input type="submit"</strong> based button:</p>
200                         <input type="submit" value="Input type=submit" data-role="none" />
201
202                         <p><strong>Input type="reset"</strong> based button:</p>
203                         <input type="reset" value="Input type=reset" data-role="none" />
204
205                         <p><strong>Input type="image"</strong> based button:</p>
206                         <input type="image" src="../_assets/images/jquery-logo.png" style="width:120px; padding:5px; background:#fff; border:1px solid #999;" value="Input type=image" data-role="none" />
207
208         </form>
209
210         </div><!--/content-primary -->          
211         
212         <div class="content-secondary">
213                 
214                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
215                         
216                                 <h3>More in this section</h3>
217                                 
218                                 <ul data-role="listview" data-theme="c" data-dividertheme="d">
219                                 
220                                         <li data-role="list-divider">Form elements</li>
221                                         <li><a href="docs-forms.html">Form basics</a></li>
222                                         <li><a href="forms-all.html">Form element gallery</a></li>
223                                         <li><a href="forms-all-mini.html">Mini form element gallery</a></li>
224                                         <li><a href="textinputs/">Text inputs</a></li>
225                                         <li><a href="search/">Search inputs</a></li>
226                                         <li><a href="slider/">Slider</a></li>
227                                         <li><a href="switch/">Flip toggle switch</a></li>
228                                         <li><a href="radiobuttons/">Radio buttons</a></li>
229                                         <li><a href="checkboxes/">Checkboxes</a></li>
230                                         <li><a href="selects/">Select menus</a></li>
231                                         <li><a href="forms-themes.html">Theming forms</a></li>
232                                         <li data-theme="a"><a href="forms-all-native.html">Native form elements</a></li>
233                                         <li><a href="forms-sample.html">Submitting forms</a></li>
234                                         
235         
236                                 </ul>
237                 </div>
238         </div>          
239
240 </div><!-- /content -->
241
242 <div data-role="footer" class="footer-docs" data-theme="c">
243                 <p>&copy; 2011-12 The jQuery Foundation</p>
244 </div>
245         
246 </div><!-- /page -->
247
248 </body>
249 </html>
250