NoJS – Creating a calculator with only HTML and CSS
blog.scottlogic.com
blog.scottlogic.com
Also quite entertaining to click through to ScottLogic's home page after that, where the strapline for what they do is:
> Pragmatic solutions to complex software challenges
Please could you give me the exact input, wrong answer and also browser?
Thank you:)
Also, it's not possible to type decimal numbers and have them displayed, although it appears they are actually being used internally. Initially, the "." button is disabled. If you press 0, then the "." button is enabled, disappears when clicked (good up to here), but then clicking any of the numbers don't change the display. So, typing "0.9 + 0.9" will look like "0 + 0" and will equal 1 (which is 1.8, rounded down). Also, if you click enough numbers, the numbers are disabled (as usual). So, the displayed state isn't matching the internal state, it appears.
I should be able to fix the rounding errors. I should disable the decimals completely in safari as my method of getting decimals isnt supported yet. (@property).
Thank you so much for the feedback
What browser and device are you on? And what result does it show
Firefox 96 displays 999889984
Edge 97 displays 999890001
The answer should be 999890001, so Edge is right and Firefox is wrong
Float multiplication's result: https://godbolt.org/z/q857f51GP
Welp, I was a pretty heartless bastard back in the days of getting my first scientific calculator.
<a href="./calc.html">
<label for="reset">C</label>
</a>
Rather than just using the formerly-ubiquitous but now rare beast (I think I saw exactly one last year), a reset button: <input type="reset" value="C">
To keep the CSS simple (!), you could even keep using the label (though ditch the <a> wrapping) and just chuck an invisible <input type=reset id=reset> in with the radio buttons, if you really want. Then the label would dangle no more.Thanks for this. I did have this earlier in the development but it didnt properly work. I'll go back to this and try again
Yes, please