title: How to focus on a particular portion of a web page using JavaScript?
body: <p>Can somebody tell me how to focus on particular part of a web page by using JavaScript events? Let's say I clicked a button and it will scroll down or scroll up to a particular portion a page. Here is my incomplete code:</p>
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
   function focusOnForm() {
    document.getElementById('form').style.display = '';
   }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload=&quot;document.getElementById('form').style.display = 'none';&quot;&gt;
  &lt;div style=&quot;height: 900px; width: width: 500px; background-color: #000;&quot;&gt;
  &lt;/div&gt;
  &lt;br /&gt;
  &lt;input type=&quot;button&quot; value=&quot;Add&quot; style=&quot;float: right;&quot; onclick=&quot;focusOnForm();&quot; /&gt;
  &lt;br /&gt;
  &lt;div id=&quot;form&quot;&gt;
   First Name: &lt;input type=&quot;text&quot; /&gt; &lt;br /&gt;
   Last Name: &lt;input type=&quot;text&quot; /&gt; &lt;br /&gt;
   Address: &lt;input type=&quot;text&quot; /&gt; &lt;br /&gt;
   Contact Number: &lt;input type=&quot;text&quot; /&gt; &lt;br /&gt;
   Email: &lt;input type=&quot;text&quot; /&gt; &lt;br /&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>I really need help.</p>