Hello !
I have a simple Javascript code like this
<script language=javascript>
var data ="Honda/Toyota/Lexus/MBez/Ford";
var check ="Honda";
if (data.indexOf(check) ==-1) {
return true;
}
else{
alert(check + " was used");
return false;
}
</script>
The problem is : If I set var check ="Hon"; I still get the Message Alert "Hon was used" (Honda was used - not Hon)
Can you please help me to solve this sistuation !
Thanks
N.A
I have a simple Javascript code like this
Code:
<script language=javascript>
var data ="Honda/Toyota/Lexus/MBez/Ford";
var check ="Honda";
if (data.indexOf(check) ==-1) {
return true;
}
else{
alert(check + " was used");
return false;
}
</script>
The problem is : If I set var check ="Hon"; I still get the Message Alert "Hon was used" (Honda was used - not Hon)
Can you please help me to solve this sistuation !
Thanks
N.A