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

Q1637 How can I get the first 200 characters from a text string?

You are here: irt.org | FAQ | JavaScript | Text | Q1637 [ previous next ]

The the string object's substring() method:

<script language="JavaScript"><!--
var str = prompt('Feed me','');

str = str.substring(0,200);

alert(str);
//--></script>

©2018 Martin Webb