微信小图消息数如何统计?

更新于
2026-09-29 15:39:53
1阅读来源:SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计79个文字,预计阅读时间需要1分钟。

微信小图消息数如何统计?

使用HTML和CSS构建网页的基础知识

html

css

#wechat { display:inline-block; position:relative; } #pic { width:200px; height:200px; } #mesgNum { width:30px; height:30px; line-height:30px; font:16px; font-weight:bold; color:#fff; text-align:center; border-radius:50%; background-color:#f00; position:absolute; right:0px; top:-10px; } js

$(function() { $("#pic").click(function() { var strnum = $("#mesgNum").text(); if (strnum == "") { $("#mesgNum").text('1'); } else { var num = parseInt(strnum) num = num + 1; $("#mesgNum").text(num); } }); });

微信小图消息数如何统计?

本文共计79个文字,预计阅读时间需要1分钟。

微信小图消息数如何统计?

使用HTML和CSS构建网页的基础知识

html

css

#wechat { display:inline-block; position:relative; } #pic { width:200px; height:200px; } #mesgNum { width:30px; height:30px; line-height:30px; font:16px; font-weight:bold; color:#fff; text-align:center; border-radius:50%; background-color:#f00; position:absolute; right:0px; top:-10px; } js

$(function() { $("#pic").click(function() { var strnum = $("#mesgNum").text(); if (strnum == "") { $("#mesgNum").text('1'); } else { var num = parseInt(strnum) num = num + 1; $("#mesgNum").text(num); } }); });

微信小图消息数如何统计?