By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,521 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,521 IT Pros & Developers. It's quick & easy.

calculation of SUM on html page

P: 1
Please solve the above problem and give me one example of HTML Code for calculation of Two Numbers and then Their SUM.


Manoj Mishra
Oct 10 '12 #1
Share this Question
Share on Google+
4 Replies

Expert Mod 10K+
P: 12,430
There is no such html code. You will have to use Javascript.
Oct 10 '12 #2

P: 7
Javascript or php. With html you can't do it! HTML is a formatting language. Not a programming language.
Oct 10 '12 #3

Expert Mod 5K+
P: 8,639
HTML is a formatting language.
though not much of it. without the default CSS in the browser, you wouldn’t have much fun. basically it’s just a data and data-structure format like XML.
Oct 11 '12 #4

P: 16
you can use this code:
Expand|Select|Wrap|Line Numbers
  1. <form>
  2. Width: <input name="width" /><br/>
  3. Length: <input name="length" /><br/>
  4. Area: <input name="area" readonly /><br/>
  5. <input type="button" value="Compute Area"
  6.   onclick="this.form.area.value = this.form.width.value * this.form.length.value;" />
  7. </form>
Here i am multiply two values and if u need u can extend...
Nov 3 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.