I'm trying to build this little piece of javascript, but it won't build it for me. Does anyone know what might be the problem? I'm still fairly new to javascript, so i hope you can bear over with me, if this is a newbie question. My code is under here:
Code:
<html>
<head>
<title>
<script language="JavaScript">
<!--
var usernum;
usernum = prompt("Write the 4 numbers ", "Write them here")
{
switch(usernum){
case "5050":
alert("310000");
break;
case "4957":
alert("567489);
break;
}
}
// -->
</script>
</head>
<body>
</body>
</html>
Last edited by a moderator: