There are really too many variables when considering the creation and validation of a form. If you consider javascript to be a bad thing, is your form secured without it? Is the form client-side or server-side only, or a mix? Is the code going to include warnings that javascript is disabled (meaning required by the form)? Is the code in the first example as compact as it should be, or are you questioning the difference between the two based on structure and content vs. format for end result?
In order to answer the question to yourself, you would really need to define the parameters for the environment/users the form would be targeted for.
Hmm... someone is trying to make you think. This must be a school lesson.
