This is my first time here since I am learning more in depth the subject of programming. I have a problem that is that I have a select with dynamically added options, but only the MOZilla is displayed well, in Chrome they are not displayed, but when you inspect them, I leave more or less the cod:
<script>
$.getJSON("kits.json", function (kitjson) {
for (i = 0; i < kitjson.kits.length; i++) {
var valorKitname = kitjson.kits[i].kitname
var x = document.getElementById("selectKit");
var option = document.createElement("option");
option.text = valorKitname;
x.add(option);
}
});
</script>
<select id="selectKit" >
<option>Mustard</option>
<option>Ketchup</option>
</select>
If anyone knows I would appreciate it! Successes!