单选框:
<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>
复选框组:
<fieldset data-role="controlgroup">
<legend>Select your hobbies:</legend>
<input type="checkbox" name="hobby1" id="hobby1" value="reading">
<label for="hobby1">Reading</label>
<input type="checkbox" name="hobby2" id="hobby2" value="traveling">
<label for="hobby2">Traveling</label>
<input type="checkbox" name="hobby3" id="hobby3" value="cooking">
<label for="hobby3">Cooking</label>
</fieldset>
多选列表:
<label for="colors">Favorite colors:</label>
<select id="colors" name="colors" multiple="multiple" data-native-menu="false">
<option value="red">Red</option>
<option value="green">Green</option>
<option value="blue">Blue</option>
</select>
上述示例中,data-role="controlgroup" 用于创建单选框和复选框的组。data-native-menu="false" 用于在多选列表中使用 jQuery Mobile 主题而不是浏览器原生的下拉菜单。
转载请注明出处:http://www.pingtaimeng.com/article/detail/14461/jQuery Mobile