我怎么能if value ==在 for 循环中做,所以我不需要做值 == 检查 10 次?
function getComboA(selectObject) {
var value = selectObject.value;
if (value == 1) {
document.getElementById("selected_slot").value = <?php echo $selected_slot1 ?>;
document.getElementById("selected_value").value = <?php echo $selected_value1 ?>;
} else if (value == 2) {
document.getElementById("selected_slot").value = <?php echo $selected_slot2 ?>;
document.getElementById("selected_value").value = <?php echo $selected_value2 ?>;
}
偶然的你