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

Q162 How can I get and/or set the content of a user-filled field?

You are here: irt.org | FAQ | JavaScript | Form | 3.1 | Q162 [ previous next ]

<form name="myFormName">
<input type="text" name="myFormFieldName">
</form>

<script language="JavaScript"><!--
//setting the value:
document.myFormName.myFormFieldName.value = "123abc";

//getting the value:
var myVariableName = document.myFormName.myFormFieldName.value;
//--></script>

This may not work with password form fields.

Feedback on 'Q162 How can I get and/or set the content of a user-filled field?'

©2018 Martin Webb