큐 형식의 배열 사용 샘플..
<html>
<head>
<title>JS test</title>
<script>
var map = new Array();
function view(){
while(map.length>0){
v = map.shift() + "<br>";
document.write( v );
}
}
function add(){
form = document.manage;
if(form.memo.value!="")
{
map.push( form.memo.value );
form.memo.value = "";
form.memo.focus();
}
return false;
}
</script>
</head>
<body>
<form name=manage onSubmit="return add();">
<input type=text name=memo>
<input type=button value=ADD onClick="add();">
<input type=button value=VIEW onClick="view();">
</form>
<script> document.manage.memo.focus(); </script>
</body>
</html>