ITPub博客

首页 > IT职业 > IT职场 > jquery 默认替换某些内容

jquery 默认替换某些内容

IT职场 作者:kikiboy 时间:2021-09-09 10:00:14 0 删除 编辑

                                       

                                           $(document).ready(function () {


                                               $(".boolstate").each(function () {


                                                   if ($(this).text() == "偏多")

                                                   { $(this).html("暂缓献血"); }

                                                   if ($(this).text() == "正常")

                                                   { $(this).html("欢迎献血"); }

                                                   if ($(this).text() == "偏少")

                                                   { $(this).html("尽快献血"); }

                                                   if ($(this).text() == "急需")

                                                   { $(this).html("急需献血"); }


                                               })

                                           });



                                       


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4588/viewspace-2814960/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-08-13

  • 博文量
    0
  • 访问量
    465