Advertisement

Javascript Calculator Program

Started by August 29, 2002 08:19 PM
1 comment, last by MrPoopypants 22 years, 5 months ago
Hey guys! I am an amateur programmer(Aside from HTML i only know some java-script and little tiny bits of C++). I have created programs in java-script that will find the volume of a cylender, area of a circle given either the diameter or radius, volume of a cube, area of a square given the length of one side, you get the point.... My next project i''m aiming to make a standard four-function calculator (*,/,+,-). Plan "A" is to make virtually a replica of windows calculator, where you can click on say number "1" and and 1 will appear inthe text box (except just the four primary functions, not anything else)Unfortunatly this may be a little over my head... Plan "B" is to have the text bar at the top where the user imputs the numbers directly into the bar and then will click the *,/,+, -, or = buttons below it. If anyone could tell me how to get numbers into the computer other than by an Internet Explorer command prompt(preferably by typing them into the text box and hitting one of the four functions), that would be greatly appreciated. (Oh and if any other novice like me would like to work with me on this, e-mail me at chillers2000@comcast.net) Thanks a lot!
(0110101101000110)The Murphy Philosophy: Smile . . . tomorrow will be worse.
Use onclick messages. I wrote a small java-script game called Boat (not my idea, it was part of a very large joke project) that had a few buttons that had the onclick attribute set to one of my game functions.

You can see it here.



The hackers must have gotten into the system through the hyperlink!!

Invader''s Realm
Advertisement
quote:
If anyone could tell me how to get numbers into the computer other than by an Internet Explorer command prompt


you can read keyboard presses by editing this code


  <html><head><script language="JavaScript">function keys(){alert(event.keyCode);}</script></head><body onKeyPress="keys()"></body></html>  

This topic is closed to new replies.

Advertisement