title: How to remove attributes from HTML using javascript?
body: <p>I have an HTML with say a textfield (input element).</p>
  
  <pre><code>&lt;input name="capacity" type="text" value="blah blah blah"&gt;
  </code></pre>
  
  <p>This simply displays a text field on my page with a default value "blah blah blah".</p>
  
  <p>What I want to do is remove value attribute, as I don't want to see this default value.
  I am doing this using javascript.</p>
  
  <pre><code>value = element.getAttribute("value");
      if((element.readOnly != undefined || element.readOnly == false) || (element.disabled != undefined || element.disabled == false)){
      //element.removeAttribute(value);    
      element.removeAttribute("value");    
  </code></pre>
  
  <p>But it is not working. I even tried <br></p>
  
  <pre><code>element.setAttribute("value","");
  </code></pre>
  
  <p>but no luck.<br>
  Any pointers where I may be missing.
  <br><br></p>
  
  <hr>
  
  <p><strong>EDIT :</strong><br>
  I got an issue related to this question, anyone interested may <a href="https://stackoverflow.com/questions/7568343/dynamically-change-the-html-source-using-native-javascript">check this</a></p>
  
  <p>*********************************************<br><br>
  Thanks a lot.</p>