mardi 11 septembre 2018

HTML Calculator Button Repeat Equals Button Problem

when researching an html calculator specifically repeating or combining "button" functions I found myself setting a web code html task for myself one day and have discovered I'm having issues. I saw a YouTube video about how only using three input buttons to do any basic calculation on a calculator is possible.

E.g. input 1+1=2 and by repeatedly pressing the 1 button + button and = button it's possible to arrive at any number.

The problem arose when I pressed the equals button to repeat the last calculation (which exists using most physical every day calculators) the display would show 1 then 2 then 3 then 4 and then by adding 11 and pressing equals you could reach the total of 15 etc.

Also the button repeating +1 or +11 or +111.... to repeat additions the three button calculator is interesting and possible.

Firstly: Why do the online calculators lack this "additional button repeat function further sum equals addition" button function that's present on most simple physical calculators?

Secondly: What is the simplest way to add this function which has been overlooked on most html based calculators?




Aucun commentaire:

Enregistrer un commentaire