Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<select 
        multiple id="myselect" style="width:300px"
        >
  <option value="box">Box</option>        
  <option value="drop">Drop</option>        
  <option value="drive">Drive</option>        
  <option value="system">system</option>        
  <option value="key">key</option>        
  
        </select >
 
  <input type="text" id="this"/>
</body>
</html>
 
var option = [];
$("#myselect").change(function() {
    var optionValues = [];
    $("select option:selected").each(function() {
        optionValues.push($(this).val());
    });
  option = optionValues;
  $('#this').val(optionValues.join());
}).trigger( "change" ); 
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers