[SOLVED] Require a JavaScript Calculator correction!
Hi,
I need this calculator to add two numbers. They don't add them, but instead concatenate them.
What should I do? Thanks.
Code:
<html>
<head><title>JS</title>
</head>
<body>
<script type="text/javascript">
var numb1=prompt("number 1: ");
var numb2=prompt("number 2: ");
document.write(numb1 + numb2);
</script>
</body>
</html>
1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
GNU/Linux User #470660 – Ubuntu User #28226
Isaac Asimov: "I do not fear computers. I fear the lack of them."
Bookmarks