如何"关闭"jQuery Mobile的<select>下拉样式?

tho*_*100 23 html mobile jquery mobile-website

我需要关闭jQuery Mobile的<select>下拉样式.最终,我希望设备本身(iPhone,Android,Blackberry等)确定<select>下拉的外观.

目前我的标记是(为了显示目的减少了选项数量):

<div data-role="fieldcontain">
    <label for="state">State:</label>
    <select name="state" id="state" data-role="none">
        <option value="MA">Massachusetts</option> 
        <option value="MI">Michigan</option> 
        <option value="MN" selected="selected">Minnesota</option> 
        <option value="MS">Mississippi</option> 
    </select> 
</div>
Run Code Online (Sandbox Code Playgroud)

我试着用data-role="none"<select>,但什么都没有改变.

有没有办法只关闭选择下拉菜单"关闭"jQuery Mobile?

小智 40

根据http://jquerymobile.com/test/docs/forms/docs-forms.html

如果您希望jQuery Mobile不要触及特定的表单控件,只需为该元素赋予属性data-role ="none".例如:

<label for="foo">
<select name="foo" id="foo"  data-role="none">
<option value="a" >A</option>
<option value="b" >B</option>
<option value="c" >C</option>
</select>
Run Code Online (Sandbox Code Playgroud)