Javascript Reference
Categories: String

javascript String indexOf( )

@March 15, 2008, 1:22 a.m.
indexOf( )Firefox/Netscape/NN 2 IE 3 ECMA 1  

indexOf(searchString[, startPositionIndex])

  

Returns a zero-based integer of the position within the current string where the searchString parameter starts. Normally, the search starts with the first (index of zero) character, but you may have the search begin later in the string by specifying the optional second parameter, which is the index value of where the search should start. If there is no match, the returned value is -1. This is a backward-compatible quick way to find out if one string contains another: if the returned value is -1 then you know the searchString is not in the larger string. If the returned value is another number (the precise value doesn't matter), the searchString is in the larger string. For browsers that support regular expressions, the String object's search( ) method performs a similar function.

 
Parameters
 
  • A string to look for in the current string object.
  • A zero-based integer indicating the position within the current string object to begin the search of the first parameter.
 
Returned Value

Integer.

atorvastatin 10mg tablet <a href="https://lipiws.top/">cost atorvastatin</a> buy atorvastatin 10mg pill
Shnrqz - 1 months
order atorvastatin 40mg pills <a href="https://lipiws.top/">order atorvastatin online cheap</a> buy atorvastatin 40mg for sale
Cshltm - 1 months

Powered by Linode.