How to enable and disable back button using JavaScript
<p>I am using VS 2010.</p>

<p>I use two links to go back/forward between pages.</p>

<p><strong>Code:</strong></p>

<pre><code>&lt;a href="#" onclick="history.go(-1);return false"&gt;&lt;img src="Images/back.jpg" /&gt;&lt;/a&gt;
&lt;a href="#" onclick="history.go(1);return false"&gt;&lt;img src="Images/forward1.jpg"/&gt;&lt;/a&gt;
</code></pre>

<p>It works well. Now I want to enable and disable the links based on browser history.</p>

<p>How do I do this using JavaScript?</p>
