Javascripts > Javascript Forms > Simple Calculation Minus
Script Title: Simple Calculation Minus
Description: Simple Calculation Minus : LENGHT DIVIDING
Example: Available
Copy the following code into your <HEAD></HEAD> tags.<Script Language="JavaScript"> function som() { var First, Last, Full; First = document.Credit.First.value; Last = document.Credit.Last.value; Full = document.Credit.Full.value; document.Credit.Full.value = (First / Last); } </Script>
Copy the following code between the <BODY></BODY> tags of your html page.<h2>LENGHT DIVIDING</h2> <font face="Verdana, Tahoma, Arial" size="3"> <form name="Credit"> <table border="0" cellpadding="0" cellspacing="0"> <tr><td width="100">LENGTH</td> <td><input type="text" name="First" size="14">METER</td></tr> <tr><td width="100">DIVIDE IN</td> <td><input type="text" name="Last" size="14">METER</td></tr> <tr><td width="100">TOTAL =</td> <td><input type="text" name="Full" size="26">METER</td></tr> <tr><td width="100"><br><br></td><td> <input type="button" value="CALCULATE THE DIVIDING" onClick="som()"> </td></tr></table></form></font>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email