title: HTML: Input type button - value equivalent to defaultValue
body: <p>I need to change the value of an input with type="button". Another function checks if it's value has been changed by comparing the "value" attribute with the "defaultValue" attribute (but that's beside the point...). This works fine for everything else except for inputs with type="button". For some reason the browser changes the default value too. But why?</p>
  
  <p><strong>Note: No jQuery!</strong></p>
  
  <p>Here's a simplified test code:</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
          &lt;script type="text/javascript"&gt;
              function d(input)
              {
                  alert("value: "+ input.value +"\ndefaultValue: "+ input.defaultValue);
              }
          &lt;/script&gt;
      &lt;/head&gt;
  &lt;body&gt;
      &lt;input type="button" value="0" onclick="d(this); this.value=1; d(this);" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>