+ 8
How to compare two text value?
two span text value, campare and find, wrong, extra and skipped word in 2nd span text, 1 span original text and 2nd span text is modified duplicate copy of first. for eg: x= "This is a original text string" y="this is a not original string" here : 'this' wrong word and 'text' is skipped and 'not' extra word in string. have any idea how to solve it?
3 odpowiedzi
+ 7
@Shudarshan Rai this case fail when any word is skipped or extra word interserted into 2nd text. then all next word count as wrong word.
+ 4
var x= "This is a original text string";
var y="this is a not haveoriginal string";
if(x != y){
alert ("not matched with original strings");
}else{
alert ("matched");
}
+ 3
above code comparea two variables x and y and using if equal or not, it send us a output