<html>
<body>
<script>
var data = [];
function test1()
{
var v1 = document.getElementById("1").value;
var v2 = document.getElementById("2").value;
var v3 = document.getElementById("3").value;
data[0]=v1;
data[1]=v2;
data[2]=v3;
};
function test2()
{
alert('1: ' + data[0] + ' 2: ' + data[1] + ' 3: ' + data[2]);
};
</script>
<input id="1">
<input id="2">
<input id="3">
<input type="button" value="Save" onclick=test1()>
<input type="button" value="Show" onclick=test2()>
</body>
</html>