JSFiddle - React, Tailwind, and code Playground
by Ganesh Salunkhe
HTML
<html>
<body>
<select multiple='miltiple' >
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<br>
<select multiple='miltiple' >
<option>A</option>
<option>B</option>
<option>C</option>
</select>
</body>
</html>
JavaScript
$(document).ready(function(){
var t ;
$('select').click(function(){
$('select option:selected').each(function(){
t = $("option:selected").map(function(){ return this.value }).get().join(", ");
});
alert(t);
});
})