jQuery Mobile w przykładach - <form><select> Lista rozwijalna

<form><select>

<!DOCTYPE html>
<html>
<head>
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css" />
   <script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
   <script src="https://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script>
</head>
<body>
<div data-role="page">
   <div data-role="header" data-position="fixed"><H1>Header</H1></div>
   <div role="main" class="ui-content">
      <form>
         <label for="select-native-1">Basic:</label>
         <select name="select-native-1" id="select-native-1">
            <option value="1">Option 1</option>
            <option value="2">Option 2</option>
            <option value="3">Option 3</option>
         </select>
         <label for="select-native-2">Mini sized:</label>
         <select name="select-native-2" id="select-native-2" data-mini="true">
            <option value="1">Option 1</option>
            <option value="2">Option 2</option>
            <option value="3">Option 3</option>
         </select>
         <label for="select-native-3">Icon left:</label>
         <select name="select-native-3" id="select-native-3" data-iconpos="left">
            <option value="1">Option 1</option>
            <option value="2">Option 2</option>
            <option value="3">Option 3</option>
         </select>
         <label for="select-native-4">Optgroup (if supported):</label>
         <select name="select-native-4" id="select-native-4">
            <option>Choose...</option>
            <optgroup label="Group 1">
               <option value="1">Option 1</option>
               <option value="2">Option 2</option>
               <option value="3">Option 3</option>
            </optgroup>
            <optgroup label="Group 2">
               <option value="4">Option 4</option>
               <option value="5">Option 5</option>
            </optgroup>
         </select>
      </form>
   </div>
   <div data-role="footer" data-position="fixed"><H1>Footer</H1></div>
</div>
</body>
</html>
Pobierz kod