When I'm Trying to Store Array using local Storage it's giving me not the desired Result Why ?.. Here is the code that i've written
<html>
<head>
<script type="text/javascript">
var Array=[];
function addToList(){
var Name=document.getElementById('Name');
Array.push(Name.value);
if(window.localStorage){
localStorage.setItem("name",Name);
}
}
</script>
<title>Local Storage Demo</title>
</head>
<body>
<h1>Local Strorage</h1>
<div>
<input type="text" id="Name" name="Name"> </input>
<button onclick="addToList()">Add</button>
</div>
</body>
</html>