/    Sign up×
Community /Pin to ProfileBookmark

javascript calculator

I am having trouble developing a calculator for my assignment
Here’s the assignment:
For this assignment, we are going to create a little calculator that adds, subtracts, multiplies or divides two numbers you enter into text boxes. As in your earlier assignment, you are going to create an HTML Form, with the two text boxes. However, this one will have 4 buttons representing the function to perform (add, subtract, multiply, divide). The first text box should accept an integer, as should the second text box. Instruct the user to enter integers into the text fields and select the operation. Finally, display the result either on the same page or in a message box. Write a JavaScript to perform these functions.

Note that you should keep the validation of integers you created in the earlier assignment. Also, it would be nice (hint) if you were to create two frames, one for the display of the buttons and text boxes, and the other frame for displaying the result. The frame feature is optional for this assignment

Needless to say I had trouble with previous validation of intergers!!!!
Thanks for help!
eostreet

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@96turnerriNov 30.2003 — try modifying some of these calculators

[URL=http://javascript.internet.com/calculators/]Calculator Scripts[/URL]
×

Success!

Help @eostreet spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...