title: how to change style display background image url
body: <pre><code> function btnclick() {
  
   var btn = document.getElementById('M_menucol').style.display;
   
   if (btn == 'none')
   {
       document.getElementById('M_menucol').style.display = 'block';
       document.getElementById('M_menubtn').style.backgroundImage = &quot;url(.../image/cancel.png)&quot;;
  
   }
   else {
       document.getElementById('M_menucol').style.display = 'none';
       document.getElementById('M_menubtn').style.backgroundImage = &quot;url(.../image/menubtn.png)&quot;;
  
   }
  
  
  
   };
  </code></pre>
  <p>i want change display none to block and reverse + backgroundimage url
  display change is working but background image change dont working
  plz give me solution...
  sorry for my bad english</p>
  <p>I'm sorry my meaning was that when I click the button it opens a menu, and the button's image changes. Clicking the button again closes the menu and returns the image to its original state.</p>
  <p>And I will study hard ;)</p>
  <p><a href="https://jsfiddle.net/phnzb10m/12/" rel="nofollow noreferrer">https://jsfiddle.net/phnzb10m/12/</a></p>