Nothing looks wrong nor anything extra is needed.
<input type="button" value="Button" name="B3" onclick="alert('hello');">
inside or outside a table should work and Javascript alert should be triggered.
Look in the designer if the table is correctly formed. Try to view-source the page with button in table and see if all looks good. If you are unable to, then post the viewsource (not all just the table part) for us to see.