You are here: irt.org | FAQ | JavaScript | Text | Q1653 [ previous next ]
If you do really mean text strings then use the comparison (==) operator:
<script language="JavaScript"><!-- var a = 'hello' var b = 'hello' if (a == b) alert(a + ' and ' + b + ' are identical'); //--></script>
If you actuall mean String objects then take a look at the article: Text Strings and String Objects