<p>Consider the following code:</p>

<pre><code>&lt;a href="#label2"&gt;GoTo Label2&lt;/a&gt;
... [content here] ...
&lt;a name="label0"&gt;&lt;/a&gt;More content
&lt;a name="label1"&gt;&lt;/a&gt;More content
&lt;a name="label2"&gt;&lt;/a&gt;More content
&lt;a name="label3"&gt;&lt;/a&gt;More content
&lt;a name="label4"&gt;&lt;/a&gt;More content
</code></pre>

<p>Is there a way to emulate clicking on the "GoTo Label2" link to scroll to the appropriate region on the page through code?</p>

<p><strong>EDIT</strong>: An acceptable alternative would be to scroll to an element with a unique-id, which already exists on my page.  I would be adding the anchor tags if this is a viable solution.</p>

I suppose this will work:
```
```
window.location="<yourCurrentUri>#label2";
```
```