When doing js string comparison, there is no equalsIgnoreCase() method in java to ignore case to compare whether two strings are equal, and both strings must be changed to lowercase or uppercase for comparison.
<script type="text/javascript">
vara = "aBc";
varb = "AbC";
//if(a.toUpperCase() == b.toUpperCase())
if(a.toLowerCase()==b.toLowerCase()) {
alert("ok");
}
</script>