Java Script - Most Effective Way To Set Value Of An Input Field
<p>I've got a short question colegues! Here it is: is this the fastest script way to change the input field's value when some of the 3 buttons are clicked? Here is the script:</p>

<pre><code>&lt;form  name="viewtype" action="javascript:alert(document.viewtype.option.value);"&gt;

     &lt;input name="option" type="hidden" value="" /&gt;

     &lt;input name="" type="button" onclick="document.viewtype.option.value='0';"/&gt;
     &lt;input name="" type="button" onclick="document.viewtype.option.value='1';"/&gt;
     &lt;input name="" type="button" onclick="document.viewtype.option.value='2';"/&gt;

     &lt;input name="" type="submit"/&gt;

&lt;/form&gt;
</code></pre>
