Home > Backend Development > PHP Tutorial > 新浪微博的字数判断解决办法

新浪微博的字数判断解决办法

WBOY
Release: 2016-06-13 10:21:00
Original
1037 people have browsed it

新浪微博的字数判断
新浪微博的字数判断怎么做的呀,光知道规则,有高手能用js写出来吗?
需求:英文字母和半角的符号(除了空格)全算半个,中文和全角符号算一个。
以http://开头的网络地址不管多少都算10个,而且能存在多个网络地址,有几个就算几个10

------解决方案--------------------

还可以输入140个字符






网络地址的好像有问题,我也不大会写

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template