<script src="http://code.jquery.com/jquery-1.5.min.js"></script> <script type="text/javascript"> function shoutSelected(){ alert( $('#ListeTable option:selected').length);</script> <select name="ListeTable" size="12" multiple="multiple" id="ListeTable" onChange="shoutSelected()"> <?php echo $msg; ?> </select>
function SelectedLength(selectTagId) { var slcts = document.getElementById(selectTagId); var cptr = 0; for (var i = 0; i < slcts.options.length; i++) if (slcts.options[ i ].selected) cptr++; return cptr; }
<script src="http://code.jquery.com/jquery-1.5.min.js"></script> <script type="text/javascript"> function shoutSelected(){ $('#res').html( $('#ListeTable option:selected').length); }</script> <select name="ListeTable" size="12" multiple="multiple" id="ListeTable" onChange="shoutSelected()"> <?php echo $msg; ?> </select>et ça a fonctionné.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionMais dis moi, connais tu comment sauvegarder une table précise de mon MySQL avec un lien ?