title: Onclick Change Div Title
body: <p>I like to change Title of a div using onclick function. I a new to .js</p>
  
  <pre><code>function changeTitle() {
      document.getElementById("amul").attr('title', 'Item Added');
  
  }
  </code></pre>
  
  <p>This is the input button where i have inserted my onclick function</p>
  
  <pre><code>&lt;input type="button" class="button2" id="item1" value="Add to Cart" title="Add to Cart" onClick="addItem_check('item_listing_100','ItemTable','100','Amul Butter','500','g','150.00','1','kg','200.00','2','kg','250.00'); amul.style.backgroundColor='#c2ed5c'; if(this.value=='Add to Cart') {this.value = 'Remove from Cart'}; item1();  "/&gt;
  </code></pre>
  
  <p>This is the div which i like to change the title</p>
  
  <pre><code>&lt;div class="center_prod_box" id="amul"&gt;. . . &lt;/div&gt;
  </code></pre>