$(".move") 表示找到一個class名為"move" 標簽,后面的js 是做了一個判斷 如果class名為"move"標簽里的內容等于2時,
那么將內容換位"Feb"。
<script type="text/javascript">
$(function () {
$(".move").each(function () {
if ($(this).text() == 02) {
$(this).text("Feb");
}else if($(this).text() == 01){
$(this).text("Jan")
}else if($(this).text() == 03){
$(this).text("Mar")
}else if($(this).text() == 04){
$(this).text("Apr")
}else if($(this).text() == 05){
$(this).text("May")
}else if($(this).text() == 06){
$(this).text("Jun")
}else if($(this).text() == 07){
$(this).text("Jul")
}else if($(this).text() == 08){
$(this).text("Aug")
}else if($(this).text() == 09){
$(this).text("Sep")
}else if($(this).text() == 10){
$(this).text("Oct")
}else if($(this).text() == 11){
$(this).text("Nov")
}else if($(this).text() == 12){
$(this).text("Dec")
}
});
});
</script>
遠近互聯技術-劉 整理發布,希望能對同是技術的你有所幫助。
遠近互聯專業提供網站建設、APP開發、網站優化、外貿網站SEO、微信運營的品牌整合營銷服務,讓客戶通過網絡品牌建立與網絡傳播提高業績。






