| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 
 |  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-ch" lang="fr-ch">
 
  <head>
 
    <title>Test IE resize</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="content-language" content="fr, fr-ch" />
 
    <script type="text/javascript">
 
      // Transfert les options sélectionnés du <select> id=idFrom au <select> id=idTo
 
      function selectTransfer(idFrom, idTo) {
 
        var selectFrom = document.getElementById(idFrom);
        var selectTo = document.getElementById(idTo);
 
        for (var i = 0; i < selectFrom.options.length; i++) {
 
          if (selectFrom.options[i] && selectFrom.options[i].selected) {
 
            selectFrom.options[i].selected = false;
            selectTo.appendChild(selectFrom.options[i]);
            i--;
          }
        }
      }
 
    </script>
 
    <style type="text/css">
 
      select { width: 48%; }
 
    </style>
 
  </head>  
  <body>
 
    <select multiple="multiple" id="from" onclick="selectTransfer('from', 'to');">
      <option value="1">Daniel Jackson</option>
      <option value="2">Samantha Carter</option>
      <option value="3">Jack O'Neill</option>
      <option value="4">Til'k</option>
    </select>
 
    <select multiple="multiple" id="to" onclick="selectTransfer('to', 'from');">
    </select>
 
  </body>
</html> | 
Partager