At least one answer has already been given which should work.
What I'd say though is that you'd be well advised to always have an ID on your elements, and not just rely on the name attribute. The name attribute is really only intended as a marker for posting form items.
CSS and the Javascript DOM are both optimised to look at IDs. You can do it by name, as in the answers you've already been given, but it's much less efficient - even if you can do it in the same amount of code, the browser will have to do more work behind the scenes.
Also some of the techniques for accessing elements by name are not available in all browsers (older versions of IE in particular have issues with [attribute] classes in CSS).