I have a form input element that has a name like "First Name"
I want to reference this in javascript, but when I do something like document.formname.First Name.value, I get an error.

It doesn't like the space in the name. Assuming I cannot change the name of the form element, how can I reference it in javascript?