突出显示客户端上的文本差异? [英] Highlight text diff on client?
本文介绍了突出显示客户端上的文本差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想比较网页上的2个文字值并突出显示差异。我可以在客户端执行此操作,最好使用jQuery或Prototype吗?
I want to compare 2 text values on a web page and highlight the differences. Can I do this client-side, preferably with jQuery or Prototype?
推荐答案
这个差异补丁匹配库似乎做得非常好:
This diff-patch-match library appears to do a really good job:
http://code.google.com/p/google -diff-match-patch /
该项目包含JavaScript,C#,C ++,Python和Java实现,它们都做同样的事情。
The project has JavaScript, C#, C++, Python, and Java implementations that all do the same thing.
这篇关于突出显示客户端上的文本差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文