我有一个脚本调用jQuery ajax函数互相嵌套 - 该脚本适用于Chrome和IE9,是否有理由不想在Firefox中运行?
代码发布在下面:
$.ajax({
type: "POST",
cache: false,
url: "addwelder.php",
data: "mywelderid="+$welderid,
success: function()
{
$.ajax({
type: "GET",
cache: false,
url: "loadwelder.php",
dataType: "json",
success: function(data)
{
$("#mywelders:last-child").append("<option value=" + data[0].toString() + ">" + data[1].toString() + "</option>");
$("#mywelders option:last").attr("selected","selected");
},
error: function(xhr, exc)
{
alert(xhr.status);
alert(exc);
}
});
},
error: function(xhr, exc)
{
alert(xhr.status);
alert(exc);
}
});