how to get the current page number from history in JavaScript?
<p>I am using vs2010.</p>

<p>I used two link to back/forward between pages.</p>

<p>the code like,</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 links based on history like the browser window.</p>

<p>How to do this?
using vs2010 and JavaScript.</p>

<p>So, I have one idea.</p>

<p>I get total history length using history.length.
then I need to check the current page is the last page or not?
how to get the current page number from history in JavaScript?</p>
