access struts form in javascript

if you have <html:form action=”/someAction”> and in your struts-config.xml, you’ve specified a name for that action (which points to an ActionForm) and your html declaration is <html:html xhtml=”true”> and inside your form you have <html:input> (with name of “userName”), then you can do this in your javascript: ( the rendered form will have an attribute…