Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1331 What does "indexOf" do?

You are here: irt.org | FAQ | JavaScript | Misc | Q1331 [ previous next ]

It shows the position of a substring in a string (or a letter in a string):

<script language="JavaScript"><!--
str = 'Hello There'
alert(str.indexOf('The'));
//--></script>

©2018 Martin Webb