1
我想在這個文件中添加更多的下拉菜單中選擇:如何在Javascript依賴選項中添加更多選項?
http://parseven.com/java_ex.html
現在它有兩個,我想提出三點多。第三個選項必須依賴於第二個選項等等。 請告訴我。提前致謝。
我想在這個文件中添加更多的下拉菜單中選擇:如何在Javascript依賴選項中添加更多選項?
http://parseven.com/java_ex.html
現在它有兩個,我想提出三點多。第三個選項必須依賴於第二個選項等等。 請告訴我。提前致謝。
數據來自哪裏?我不確定你最需要哪個部分的答案:
這裏基本上是你做什麼:
document.getElementById('dropdown1').onchange = yourFunction;
function yourFunction() {
//Here is where you need to get the data
//Then you need to add them to the other dropdown like this:
var dropdown2 = document.getElementById('dropdown2');
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
dropdown2.options.add(optn);
}