jquery 添加样式

   注意:style样式添加方式  $(this).find("a").attr("style", "display:inline-block");  而不是  $(this).find("a").attr("display", "inline-block"); 

$(function () {
            $.each($(".GridViewStyle tr td"), function () {
                //alert($(this).find("a").text());
                if ($(this).find("a").text() == "查看报告") {
               
                    $(this).find("a").attr("style", "display:none");
                }
                if ($(this).text().indexOf("报告已出") > -1) {
                    $(this).find("a").attr("style", "display:inline-block");
                }
            });
        });

posted @ 2012-03-20 18:14  呓语  阅读(2073)  评论(0编辑  收藏  举报
welcome to this garden! --Chenly