Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let BMW_modele = ['1M', '3GT', 'i8', 'iX2', 'Seria 5', 'X7']
- let Mercedes_lista = ['AMG GT', 'Citan', 'CLA', 'CLE', 'EQA', 'EQB', 'EQC', 'EQE']
- var modeleAudi = ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'e-tron']
- var modeleToyota = ['Yaris', 'Yaris Cross','Corolla TS Kombi','Corolla Sedan','C-HR','C-HR Plug-in Hybrid','bZ4X','Prius']
- var modeleHonda = ['Jazz', 'Civic', 'HR-V', 'Accord', 'Prelude', 'CRX']
- var moOpel = ["Corsa", 'Astra', 'Insignia', "Grandlan X"]
- let nice = document.getElementById("gotowe")
- let BMW_l = document.getElementById("BMW")
- let modele = document.getElementById("modele")
- let opel = document.getElementById("Opel")
- let Toyota = document.getElementById("Toyota")
- let Mercedes = document.getElementById("Mercedes")
- let Honda = document.getElementById("Honda")
- let Audi = document.getElementById("Audi")
- let r = document.getElementById("r")
- BMW_l.onclick = function() {
- modele.innerHTML = ''
- BMW_modele.forEach(function(optionText) {
- let option = document.createElement('option');
- option.text = optionText
- modele.appendChild(option);
- });
- }
- opel.onclick = function() {
- modele.innerHTML = ''
- moOpel.forEach(function(optionText) {
- let option = document.createElement('option');
- option.text = optionText
- modele.appendChild(option);
- });
- }
- Toyota.onclick = function() {
- modele.innerHTML = ''
- modeleToyota.forEach(function(optionText) {
- let option = document.createElement('option');
- option.text = optionText
- modele.appendChild(option);
- });
- }
- Mercedes.onclick = function() {
- modele.innerHTML = ''
- Mercedes_lista.forEach(function(optionText) {
- let option = document.createElement('option');
- option.text = optionText
- modele.appendChild(option);
- });
- }
- Honda.onclick = function() {
- modele.innerHTML = ''
- modeleHonda.forEach(function(optionText) {
- let option = document.createElement('option');
- option.text = optionText
- modele.appendChild(option);
- });
- }
- Audi.onclick = function() {
- modele.innerHTML = ''
- modeleAudi.forEach(function(optionText) {
- let option = document.createElement('option');
- option.text = optionText
- modele.appendChild(option);
- });
- }
- r.onclick = function() {
- modele.innerHTML = ''
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement