faqts : Computers : Programming : Languages : JavaScript : Forms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 4 people (25%) answered Yes
Recently 1 of 4 people (25%) answered Yes

Entry

Is it possible to pass a javascript variable to the "value attribute" of an input tag?

Aug 11th, 2006 16:21
David Alden, Steve K,


var myVariable = "text in the value attribute of the input tag";
document.yourFormName.yourInputTagName.value = myVariable;