»
AnglaisFran�aisVietnamien

Imprimer - Multi Valeur liste déroulante - JavaScriptBank.com

Version compl�te: jsB@nk » Form » Dropdown » Multi Valeur liste déroulante
URL: https://www.javascriptbank.com/multi-value-drop-down-list.html

Multi Valeur liste déroulante © JavaScriptBank.comUtilisation d'un menu déroulant, ce script permettra de fournir des valeurs différentes, en fonction de la sélection de l'utilisateur. Facilement ajouté à n'importe quelle forme.

Version compl�te: jsB@nk » Form » Dropdown » Multi Valeur liste déroulante
URL: https://www.javascriptbank.com/multi-value-drop-down-list.html



JavaScript
<script language="javascript">// Created by: Jay Rumsey | http://www.nova.edu/~rumsey/function ShowReg(op) {  document.getElementById('Car').style.display='none';  document.getElementById('Boat').style.display='none';  document.getElementById('Plane').style.display='none';  if (op == 1) {    document.getElementById('Car').style.display="block";  }  if (op == 2) {    document.getElementById('Boat').style.display="block";  }  if (op == 3) {    document.getElementById('Plane').style.display="block";  }}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<select id="choice" onChange="ShowReg(this.selectedIndex)">  <option value='0'>Select registration type  <option value="1">Car  <option value="2">Boat  <option value="3">Plane</select><br><div id="Car" style="display:none">  VIN No. <input type="text" id="VIN" value=""></div><div id="Boat" style="display:none">  Registration No. <input type="text" id="Breg" value=""></div><div id="Plane" style="display:none">  Tail No. <input type="text" id="Ptail" value="">  Model <input type="text" id="Pmodel" value=""></div><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->