1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
<div id="modele">
<label for="modelevoiture">Modèle voiture</label>
<select name="modelevoiture" id="modelevoiture">
<option>-Modèle-</option>
</select>
<!--FONCTION list to list -->
<script type="text/javascript">
function updateSelect(value){
var option = null;
switch(value){
case 'ALFA ROMEO':
var AlfaRomeos = ['MITO','145','146','147','GIULETTA','156','159','166','156 BREAK','159 BREAK','BRERA','GT','GTV','SPIDER' ,'156 CROSSOVER'];
for(var i =0; i < AlfaRomeos.length;i++)
{
option +='<option value="'+AlfaRomeos[i]+'">'+AlfaRomeos[i]+'</option>';
}
break;
case 'AUDI':
var Audis = ['A1','A2','A3','A4','A5','A6','A7','A8','TT','RS3','R8','S3','S4','S5','A4 QUATTRO','A4 BREAK','A6 BREAK','S4 BREAK','S6 BREAK','Q3','Q5','Q7'];
for(var i=0; i< Audis.length;i++)
{
option +='<option value="'+Audis[i]+'">'+Audis[i]+'</option>';
}
break;
default:
break;
}
document.getElementById('modelevoiture').innerHTML = option;
}
</script>
</div>
</div> |
Partager