title: Identifying the form elements from an HTML page
body: <p>Is there any way to find out whether there is a <code>&lt;form&gt;&lt;/form&gt;</code> tag in an HTML page (Using PHP and JQuery) and get the form? For example my page is <code>page.php</code> code below,</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;
  &lt;h1&gt; HAI TESTING&lt;/h1&gt;&lt;h1&gt; HAI TESTING  1 &lt;/h1&gt;
  &lt;form name="test" method="post" id="test" action="" enctype="multipart/form-data"&gt; 
          &lt;input type="text" name="name"&gt;
          &lt;input type="radio" name="a" value="a"&gt;&lt;input type="radio" name="a" value="b"&gt;
          &lt;input type="checkbox" name="chekbox"&gt;
          &lt;input type="email" name="email"&gt;
          &lt;textarea&gt;test&lt;/textarea&gt;
          &lt;input type="submit" name="submit"&gt;
      &lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>From the above file <code>page.html</code>, I need to get this output:</p>
  
  <pre><code>&lt;form name="test" method="post" id="test" action="" enctype="multipart/form-data"&gt; 
      &lt;input type="text" name="name"&gt;
      &lt;input type="radio" name="a" value="a"&gt;&lt;input type="radio" name="a" value="b"&gt;
      &lt;input type="checkbox" name="chekbox"&gt;
      &lt;input type="email" name="email"&gt;
      &lt;textarea&gt;test&lt;/textarea&gt;
      &lt;input type="submit" name="submit"&gt;
  &lt;/form&gt;
  </code></pre>