我无法让这个 javascript 代码工作。我从选项中获得了价值,但它不通过 ajax 处理!
function get_lan() {
var lan_code = document.getElementById('customDropdown1').value;
var params = "lan=" + lan_code;
$.ajax({
type: "POST",
url: "api/get_lan.php",
data: params,
success: function(result) {
callback(result);
document.getElementById("lan_code").innerHTML = result;
}
});
}