这里有一些问题。 似乎只在 IE 8(或 7)中失败。 如果你能帮助我,我会很高兴。
$.ajax({type: "POST",
url:"update_data.php",
data: {
table:table,
key:key,
obj_name:"New Element"
},
success: function(data){
$('.ajax').html($('.ajax input').val());
$('.ajax').removeClass('ajax');
$.get("get_process.php", {
func: "software",
selected: "All_Software"
}, function(response){
$('#result_software').fadeOut();
setTimeout("finishAjax_software('result_software', '"+escape(response)+"')", 400);
})
return false;
}
});updateSelect('software');
这里是updateSelect的代码:
function updateSelect(id){
$('#'+id).html('');
$.get("get_process.php", {
options: id,
},
function(response){
$('#'+id).fadeOut();
setTimeout("finishAjax_"+id+"('"+id+"', '"+escape(response)+"')", 1000);
})
}
因此 updateSelect 调用在 IE 8 中不起作用。请帮助我
最佳答案
尝试:
function updateSelect(id){
$('#'+id).html('');
$.get("get_process.php", {
options: id // <-- remove trailing comma
},
function(response){
$('#'+id).fadeOut();
setTimeout("finishAjax_"+id+"('"+id+"', '"+escape(response)+"')", 1000);
}
)
}
关于JavaScript 函数调用在 IE 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12482508/