按键事件在所选的 jquery 中不起作用。下面是我的代码:
$(".chzn-select").chosen();
$(".chzn-select").keypress(function () {
$.ajax({
url: "populateAirportCodes?fragments="+element.target,
type: "POST",
data: JSON.stringify(org),
contentType: "application/json",
async: false,
success: function(data) {
<** populate the data in chosen **>
}
});
});