Jump to content

Form calculator


isee

Recommended Posts

Im trying to create a form with JS/html . Please look at image as an example of the mechanism .image.jpgSo far i got this and all it does is add up stuff..<html><head><script language="javascript">function AddInputs(){var total = 0;var coll = document.getElementsByTagName("input")for ( var i = 0; i<coll.length; i++){var ele = coll;total += parseInt(ele.value);}var Display = document.getElementById("Display");Display.innerHTML = total;}</script></head><body><input onkeyup="AddInputs()" /><input onkeyup="AddInputs()" /><input onkeyup="AddInputs()" /><span id="Display" style="float:right;background:red;"></span></body></html>So i need help if someone knows how to allow quantity multiplication :S and even with adding this is basically like a form that allows people to just input some numbers and quantity to see a subtotal NO this is not for ecommerce .

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...