javascript: Different syntax same answer
<pre><code>&lt;input type="checkbox" id="alert1" value="111"&gt;
&lt;input type="checkbox" id="alert2" value="222"&gt;
&lt;input type="checkbox" id="alert3" value="333"&gt;
&lt;input type="button" onclick="checkBox()" value="check"&gt;

function checkBox(){

   var alert1 = document.getElementById('alert1').checked;
   var alert2 = document.getElementById('alert2').checked;
   var alert3 = document.getElementById('alert3').checked;

   if(alert1 == 1 &amp;&amp; alert2 == 2 &amp;&amp; alert3 == 1){
      do somthing...
   }

   if(alert1 == 1 || alert2 == 2 || alert3 == 1){
      do somthing...
   }
}
</code></pre>

<p>What should i do if i like only one of this condition to be "true".
This syntax show both of the conditions as "true".</p>
