Necesito 2 listas desplegables, siga este tutorialhttps://www.w3schools.com/howto/howto_js_cascading_dropdown.asp
y necesito eliminar 1 menú desplegable de declarar en javascript, número de menú desplegable secundario de resultado, no texto de cadena.
var subjectObject = { "Bể gom": { "pH": ["1 OK","2 OK"], "COD": ["4 OK","5 OK"] }, "ERROR list": ["not SHOW", "not SHOW2", "not SHOW3"] } window.onload = function () { var subjectSel = document.getElementById("subject"); var topicSel = document.getElementById("topic"); for (var x in subjectObject) { subjectSel.options[subjectSel.options.length] = new Option(x, x); } subjectSel.onchange = function () { //empty Chapters- and Topics- dropdowns //chapterSel.length = 1; topicSel.length = 1; //display correct values for (var y in subjectObject[this.value]) { topicSel.options[topicSel.options.length] = new Option(y, y); } } }