简体   繁体   中英

html <select> - does it work on cordova/phonegap app?

I'm developing a cordova 3.0 app and I'm testing it with ripple emulator.

I used a <select> html element like this:

  <select id="selector" >
   <option value="2"> 
        ...
   </option>
   <option value="4">   
        ...
   </option>
  </select>

and on ripple emulator I see it like we see <select> elements on websites, like this: 在此处输入图片说明

I'd like to know whether it works fine on Android, iOS etc... and how it will be shown on the real mobile device.

If using <select> on a mobile cordova app is not a good practice, what could I use to replace it? I'm also using jQuery 1.11.1.

Thanks

So far I know native browsers will take over the dropdown view unless you apply any extra style like in JQM data-native-menu="false" .

In android, it'll look like

例1

in lower android versions

例2

in iOS

例3

Now this changes with OS/browser versions,not sure. But if you want consistent look in all device, then you need something like that in JQM which can override existing dropdown style.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM