文本输入框:
<label for="username">Username:</label>
<input type="text" id="username" name="username">
密码输入框:
<label for="password">Password:</label>
<input type="password" id="password" name="password">
电子邮件输入框:
<label for="email">Email:</label>
<input type="email" id="email" name="email">
数字输入框:
<label for="quantity">Quantity:</label>
<input type="number" id="quantity" name="quantity" min="1" max="10">
单选框:
<fieldset data-role="controlgroup">
<legend>Choose your gender:</legend>
<input type="radio" name="gender" id="male" value="male">
<label for="male">Male</label>
<input type="radio" name="gender" id="female" value="female">
<label for="female">Female</label>
</fieldset>
复选框:
<label for="subscribe">Subscribe to newsletter:</label>
<input type="checkbox" id="subscribe" name="subscribe" value="yes">
下拉列表:
<label for="country">Country:</label>
<select id="country" name="country">
<option value="usa">United States</option>
<option value="canada">Canada</option>
<option value="uk">United Kingdom</option>
</select>
文本区域:
<label for="comments">Comments:</label>
<textarea id="comments" name="comments"></textarea>
日期选择器:
<label for="birthdate">Birthdate:</label>
<input type="date" id="birthdate" name="birthdate">
这只是一些常见的表单输入元素的例子。在 jQuery Mobile 中,这些元素会自动获得样式和结构,以适应移动设备的屏幕尺寸。你可以根据需要组合这些元素,并根据具体情况进行定制。
转载请注明出处:http://www.pingtaimeng.com/article/detail/14460/jQuery Mobile