这是我的jQuery代码
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$("#tasks").hide();
$("select#categories").change(function(){
$("#tasks").show();
$.getJSON("ajax.php?module=responsibles&action=list_tasks",{id: $(this).val()}, function(j){
if($("#categories").val()=="-0")
{
$("#tasks").hide();
}
//if the div is hidden
$("div#form_objectifs").hide();
var options = '';
for (var i = 0; i < j.length; i++)
{
options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
}
$("#tasks").html(options);
$('#tasks option:first').attr('selected', 'selected');
})
})
});
</script>
此代码在 FF 或 Chrome 上运行良好,但在 IE 中无法用于向上、向下箭头键
任何人