Can't add checked property for checkbox
<pre><code>&lt;input type=checkbox id="chk1" name="chk" onclick="getchecked('chk1')"/&gt;
&lt;input type=checkbox id="chk2" name="chk" onclick="getchecked('chk2')"/&gt;

getchecked(pId)
{
  if(pId.checked==true)
    alert('ok');
  else
    alert('not ok');
}
</code></pre>

<p>In my runtime if i checked any checkbox it does not add the checked property for that checkbox, I verified that in Developer tool bar.</p>

<p>So it always entering into else block Why?</p>
