eCommerce
Addition, multiplication and concatenation demo using Javascript
Javascript adds the two numbers in the fields and puts the result in a hidden field. Then it multiplies the two numbers and puts the result in a second hidden field. Finally it puts the concatenation (treating the numbers as text and butting them up against each other) and puts the result in a third hidden field. All five quantities - four numbers and a string) - are sent back to the server, which just echoes them back to the user. But the addition, multiplication and concatenation are done client-side instead of server-side.