Monday, April 23, 2012

Display a sessionStorage item

I want to display the field player but i can't:



<body>

<header>
<h1>My memory Game</h1>
</header>

<div id="timer">
Player Name:
<span id="player-name">

<script type='text/javascript'>

sessionStorage.getItem('player');

//alert("Your name is: " + sessionStorage.getItem('player'));

</script>
</span>
</div>


When i test it by using javascript alert everything work : the player name is desplayed without a problem
Any idea please





No comments:

Post a Comment