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

Q941 How can I convert all the text in a textarea to upper case, when the text has changed?

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

Try:

<script language="JavaScript"><!--
function Upper(TextField) {
    TextField.value = TextField.value.toUpperCase();
}
//--></script>

<form>
<textarea name="title" OnChange="Upper(this.form.title)">
This is my title</textarea>
</form>

©2018 Martin Webb