»
EnglishFrenchVietnamese

Print - Fast select of your indexed number - JavaScriptBank.com

Full version: jsB@nk » Form » Fast select of your indexed number
URL: https://www.javascriptbank.com/fast-select-of-your-indexed-number.html

Fast select of your indexed number © JavaScriptBank.comThe code help visitors select fast an indexed number through buttons.

Full version: jsB@nk » Form » Fast select of your indexed number
URL: https://www.javascriptbank.com/fast-select-of-your-indexed-number.html



JavaScript
<SCRIPT type=text/JavaScript> var compteur = 3;var arret = new Boolean;function selectplus() {compteur = document.indexselect.choix.selectedIndex;if (compteur < document.indexselect.choix.length-1) {compteur ++;} document.indexselect.choix.selectedIndex=compteur;if (compteur < document.indexselect.choix.length-1 && arret == false) {setTimeout('selectplus()',100);}}function selectmoins() {compteur = document.indexselect.choix.selectedIndex;if (compteur > 0) {compteur --;} document.indexselect.choix.selectedIndex=compteur;if (compteur > 0 && arret == false) {setTimeout('selectmoins()',100);}}function selectonep() {compteur = document.indexselect.choix.selectedIndex;if (compteur < document.indexselect.choix.length-1) {compteur ++;} document.indexselect.choix.selectedIndex=compteur;}function selectonem() {compteur = document.indexselect.choix.selectedIndex;if (compteur > 0) {compteur --;} document.indexselect.choix.selectedIndex=compteur;}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM name=indexselect><P><SELECT style="COLOR: black; BACKGROUND-COLOR: antiquewhite" size=3 name=choix width="10px" value="Numbers"> <OPTION>1<OPTION>2<OPTION>3<OPTION   selected>3<OPTION>4<OPTION>5<OPTION>6<OPTION>7<OPTION>8<OPTION>9<OPTION>10<OPTION>11<OPTION>12<OPTION>13<OPTION>14<OPTION>15<OPTION>16<OPTION>17<OPTION>18<OPTION>19<OPTION>20<OPTION>21<OPTION>22<OPTION>23<OPTION>24<OPTION>25<OPTION>26<OPTION>27<OPTION>28<OPTION>29<OPTION>30<OPTION>31</OPTION></SELECT> <INPUT onclick=document.indexselect.result.value=document.indexselect.choix.selectedIndex type=button value="Select !"> </P><P><INPUT onmouseup=arret=true onmousedown="arret=false;selectplus();return false" type=button value=Down>&nbsp;<INPUT onmouseup=arret=true onmousedown="arret=false;selectmoins();return false" type=button value=Up> <SPAN style="MARGIN-LEFT: 20px">One by One : <INPUT onmousedown="selectonep();return false" type=button value=Down>&nbsp;<INPUT onmousedown="selectonem();return false" type=button value=Up> </SPAN></P><P>Your select : <INPUT name=result size="20"></P></FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->