本文介绍了如何“关闭” jQuery Mobile的< select>的样式下降?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

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



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

 < div data-role =fieldcontain> 
< label for =state>状态:< / label>
< option value =MA>马萨诸塞州< / option>
< option value =MI>密歇根< / option>
< option value =MNselected =selected>明尼苏达< / option>
< option value =MS>密西西比< / option>
< / select>
< / div>

我试过使用 data-role =none关于< select> ,但没有任何变化。 有没有办法关闭jQuery Mobile for the only drop down?

解决方案

根据



如果你更喜欢jQuery Mobile保留一个特定的表单控件,只需给这个元素指定属性data-role =none。例如:

 < label for =foo> 
< option value =a> A< / option>
< option value =b> B< / option>
< option value =c> C< / option>
< / select>


I need to turn off jQuery Mobile's styling of <select> drop downs. Ultimately I'd like the device itself (iPhone, Android, Blackberry, etc.) to determine how the <select> drop down looks.

Currently my markup is (option quantity reduced for display purposes):

<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>

I tried using data-role="none" on the <select> but nothing changed.

Is there a way to "turn off" jQuery Mobile for just the select drop down?

解决方案

according to http://jquerymobile.com/test/docs/forms/docs-forms.html

If you'd prefer that a particular form control be left untouched by jQuery Mobile, simply give that element the attribute data-role="none". For example:

<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>

这篇关于如何“关闭” jQuery Mobile的&lt; select&gt;的样式下降?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 18:25