title: What is the equivalent of isset($_POST['name']) in javascript?
body: <p>I have two forms (consisting of checkboxes) on two different PHP pages. I want to use the values submitted from the first form to disable checkboxes in the second form.</p>
  
  <p>page1.php:</p>
  
  <pre><code>&lt;form method="POST" action="page2.php"&gt;
  &lt;input type="checkbox" id="1"&gt;
  &lt;input type="checkbox" id="2"&gt;
  &lt;input type="checkbox" id="3"&gt;
  &lt;input type="checkbox" id="4"&gt;
  &lt;input type="checkbox" id="5"&gt;
  &lt;input type="checkbox" id="6"&gt;
  &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>page2.php:</p>
  
  <pre><code>&lt;form method="POST" action="action.php"&gt;
  &lt;input type="checkbox" id="1"&gt;
  &lt;input type="checkbox" id="2"&gt;
  &lt;input type="checkbox" id="3"&gt;
  &lt;input type="checkbox" id="4"&gt;
  &lt;input type="checkbox" id="5"&gt;
  &lt;input type="checkbox" id="6"&gt;
  &lt;input type="submit"&gt;
  &lt;/form&gt;
  
  &lt;script&gt;
  if(!isset($_POST['2'])){
  document.getElementById("4").disabled = true;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>What should I use instead of this?</p>
  
  <pre><code>if(!isset($_POST['2']))
  </code></pre>
  
  <p>I can't use jQuery due to professor limitations.</p>