Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Word
Microsoft Frontpage
How can I get Frontpage to ad? (calculating)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Trevor Lawrence, post: 10462661"] Try this <html> <head> <script type="text/javascript"> function calcform() { with (document.form1) { result.value = +number1.value + +number2.value} /*Note the extra + operator before each value. This is needed to convert the value from a string to a number.*/ } </script> </head> <body> Sum of Two Numbers <form name="form1" action=""> Number 1:<br /> <input type="text" id="number1" value="" size="40" /><br/> Number 2:<br /> <input type="text" id="number2" value="" size="40" /><br/> Sum:<br /> <input type="text" id="result" value="" size="40" /><br/> <input type="button" id="Calculate" value="Calculate" onclick="calcform()" /> <input type="reset" id="reset" value=" Clear "/> </form> </body> </html> [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Word
Microsoft Frontpage
How can I get Frontpage to ad? (calculating)
Top