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