Session Storage in HTML and Javascript

<title>Session Storage</title>

<script type="text/javascript">

    function clickCounter() {

        if (typeof (storage) != "undefined") {

            if (sessionStorage.clickCounter) {

                sessionStorage.clickCounter = Number(sessionStorage.clickCounter) + 1;

            } else {

                sessionStorage.clickCounter = 1;

            }

            document.getElementById("result").innerHTML = "You haev clicked the button" + sessionStorage.clickCounter + Times

        } else {

            document.getElementById("result").innerHTML = "Your Browser not suport."

        }

    }

</script>
<h1 id="result"></h1>

<input type="button" value="Click Me!"  onclick="clickCounter()">