首页 > IT职业 > IT职场 > jquery 默认替换某些内容
$(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/ ,如需转载,请注明出处,否则将追究法律责任。