Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Form 3.1 | Q162 [ previous next ]

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

<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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.