can anyone help me with jjavascript, how to make a simple calculator using the documentgetid
http://www.sciencebuddies.org/science-fair-projects/project_ideas/CompSci_p001.shtml First result in Google for "simple calculator in javascript". Seems like a good start. I'm sure you could implement that and expand on it as needed.
hmmm ..... coding up the interface should be simple enough; the tedious part would be in scripting in an event listener and deciding what to do when keys or combonation of keys are pressed
then script up a function that writes the input into a variable to solve for perhaps
something based on this perhaps? <html> <body onkeyup="getKeys()"> </body> <script language=javascript> var keys=new Array() var k=1 function getKeys() { keys[k]=window.event.keyCode k = k+1 } function calculate() { for (j=1;j<keys.length;j=j+1) {parse the information} display the information } </script> </html>
many thanks, i will try it out and reply
if you type up some the html, save it, and attach it to the post; we can see what direction you are going in :)
Please attach your code next time. That would be nice.
i have done a bit, but i cant get it to equals and give the answer
did u get the code?
if you attach the file, .txt or .html doesnt matter, to the post; we can look thru it, give options, debug it, and help out more :) just use the "Attach File" option that is located at the bottom of the screen under the reply box.
Join our real-time social learning platform and learn together with your friends!