Kod
<select id="lBetonID">
<option>- wybierz -</option></select>
<option>- wybierz -</option></select>
i
Kod
//Lista dla betonu
var zmsel1 = document.getElementById("lBetonID");
var zmopt1 = concrete[0].slice(2);
for(var i = 0; i < zmopt1.length; i++) {
var opt1 = zmopt1[i];
var el1 = document.createElement("option");
el1.textContent = opt1;
el1.value = opt1;
zmsel1.appendChild(el1);
}
var zmsel1 = document.getElementById("lBetonID");
var zmopt1 = concrete[0].slice(2);
for(var i = 0; i < zmopt1.length; i++) {
var opt1 = zmopt1[i];
var el1 = document.createElement("option");
el1.textContent = opt1;
el1.value = opt1;
zmsel1.appendChild(el1);
}
Mam problem z ustawieniem wartości wejściowej selected, można gdzieś ją wkomponować?