Skip to content Skip to sidebar Skip to footer

What Is The Alternate Function For Indexof For String In Ie8?

I have used indexOf to check whether i have particular text is present in a sentence or not like the following var temp = ''; temp='data not available'; if(temp.indexOf('datas') ==

Solution 1:

I think you're confused about which indexOf() is supported.

You're using String.prototype.indexOf(), which is supported from IE6 onwards, according to Microsoft's documentation.

It's Array.prototype.indexOf() that's only supported from IE9 onwards.

Post a Comment for "What Is The Alternate Function For Indexof For String In Ie8?"