I am required to find for a specific word in a text input whereby the word is the "+" symbol. The users for my program uses IE8 and IE11 and unfortunately when I looked in w3schools, I found out that the includes() method is not supported in Internet Explorer 11 (or earlier). Below is my code:
<input type="text" class="recycle" name="txtEXT_AK" id="txtEXT_AK" size="10" onclick="this.select()">
document.getElementsByClassName("recycle").onkeyup = function(){checker()}
function checker(){
var text_value=document.getElementsByClassName("recycle");
word="+";
var textValue = text_value.value;
if (textValue.includes(word))
{
alert('found')
}
}
So far, there is no alert() coming out when I tried to enter the "+" symbol into the text box. Is there any alternative for the includes() method that I can use for the checker code? I have tried indexOf, contains and match but so far there is no luck. Any help is really appreciated!