Forum Moderators: open
First of all:
Welcome to Webmaster World!
As for your question, you should probably rewrite your code like this:
<form name='contact'>
<input type='hidden' name='s0[cmd]' id='s0[cmd]' value='' />
<button onclick="document.getElementById('s0[cmd]').value='new value'">clickme</button>
</form>
That should do the trick with all modern browsers at least--you need an id attribute on the form element for this to work. It doen't have to have to be the same as the name attribute, but it is less confusing to do so.
Hope this helps,
ajkimoto