Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize Calculator with JS

Shulou Source: shulou.com Published: 2022-06-03 04:07:59 11月15日 Update

This article mainly shows you "JS how to achieve calculators", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to achieve calculators in JS" this article.

JS Calculator body,p,input {margin: 0; padding: 0;} .wp {width: 500px; height: 500px; border:10px solid black; margin: 0 auto; margin-top: 100px;} # text {width: 480px; height: 90px; border-bottom: 10px solid black; font-size: 50px; line-height: 100px; text-align: left; padding-left: 20px; background: # ffffff } input {width: 125px; height: 100px; background: # c0c0c0; float: left; font-size: 40px; line-height: 100px; text-align: center;} _ window.onload = function () {var oText = document.getElementById ('text'); var aBtn = document.getElementsByTagName (' input'); var aText = oText.value for

Tags: Calculators content articles learning help easy to understand more organization knowledge editing industry information information channels channels research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Apple NVidia MySQL Docker