Using jQuery, I attach an event handler to the parents of my input controls.
All of my input controls have the class "input" and they exist in their own table cells. If you at least wrapped your input tags in a div, then this should work without a table as well.