counter using javascript
<pre><code>&lt;?php
    session_start();

    if(isset($_SESSION['views']))
    $_SESSION['views']=$_SESSION['views']+1;

    else
    $_SESSION['views']=1;
    echo "Views=". $_SESSION['views'];
    echo '&lt;br&gt;'."&lt;a href='destroy.php'&gt;Set Counter1&lt;/a&gt;";
    ?&gt; 
</code></pre>

<p>the above code was maintaining a counter, each time when user will refresh page it will increment. i want to do same work but with javascript but can't find anything online help plz </p>
