Pass variable from html to Javascript on button click Format If statment
<p>Iam trying to have button's on a html page and format my output with an if statement in javascript But I cant get it to work, I either get both(cant be correct) or (neither) Ive formatted the code here as an example, it does not work but hopefully you will be able to understand and answer my query.</p>

<pre><code>&lt;script type="text/javascript"&gt;
  function handleIt(n){
    if (n = "A"){alert("A");}
    if (n = "D"){alert("D");}
  }
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Admin Control panel :&lt;/h1&gt;
   &lt;button type="button"id="A"onclick="handleIt(n)"&gt;+&lt;/button&gt;
   &lt;button type="button"id="D"onclick="handleIt("D")"&gt;-&lt;/button&gt;
</code></pre>