如果显示为null则替换为0

$("table tr").each(function(){
    var td=$(this).find("td");
    $(td).each(function(){
        if($(this).html()=="null"||$(this).html()=="undefined"||$(this).html()=="$undefined"){
            $(this).html("0");
        }
    });
});

猜你喜欢

转载自blog.csdn.net/chose_doit/article/details/79077701