jamesk
05-30-2009, 10:28 PM
<script type=text/javascript>
//the numbers
num1=1
num2=2
num3=3
//working out the answer
answer=num1+num2+num3
//showing on the page
document.write(""+num1+"+"+num2+"+"+num3+" = "+answer+"");
</script>
This script adds up numbers. You can have as many as you like or change it to a subtraction script. I'll show that code later if you want it :)
//the numbers
num1=1
num2=2
num3=3
//working out the answer
answer=num1+num2+num3
//showing on the page
document.write(""+num1+"+"+num2+"+"+num3+" = "+answer+"");
</script>
This script adds up numbers. You can have as many as you like or change it to a subtraction script. I'll show that code later if you want it :)