Jquery自定义字符串比较函数与输出百分比 [英] Jquery custom string comparison function with output percentage

查看:90
本文介绍了Jquery自定义字符串比较函数与输出百分比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在Jquery中编写一个比较两个字符串并返回相似百分比的函数。就像PHP函数similar_text一样:

I am looking to write a function in Jquery that compares two strings and returns a percentage of similarity..exactly like the PHP function similar_text:

http://www.php.net/manual/en/function.similar-text.php

有关如何使用Jquery / Javascript解决此问题的想法?谢谢!

Ideas on how to tackle this with Jquery/Javascript? Thanks!

推荐答案

PHP.JS拥有它: http://phpjs.org/functions/similar_text:902

PHP.JS have it: http://phpjs.org/functions/similar_text:902

这篇关于Jquery自定义字符串比较函数与输出百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆