我的脚本有问题。我在 setTimout 中使用 jQuery.post 函数,它TypeError: g.nodeName is undefined
在 Firebug 上返回。这是我的脚本:
jQuery(function($) {
var timer;
$("#tabela-orcamento .item .item-qtd .qtd-item").keyup(function() {
clearTimeout(timer);
timer = setTimeout(function() {
$.post("../../aj_orc.php?op=atualizaQtd", {
item: $(this).parents(".item").attr("data-item"),
qtd: $(this).val()
}, function(data) {
$("#retornos").html(data);
});
},1000);
});
});
有什么问题吗?