Program to calculate the number of forces

HTML: <div class="container"> <h2>Program to calculate the number of forces</h2> <label>BASE</label><br> <input type="text" id="base" /><br> <small>Enter the base value.</small><br><br> <label>FORCE</label><br> <input type="text" id="force" /><br> <small>Enter the force value.</small><br><br> <label>RESULT</label><br> <input type="text" id="result" disabled /><br><br> <button type="button" id="buton">CALCULATE</button> <div id="mes"></div> </div> CSS: body{ padding:0; margin:0; font-family:Arial; background:#262626; } .container{ width:500px; height:350px; background-color:#d7d7d7; border-radius:10px; padding:20px; position:absolute; top:50%;... Continue Reading →

JavaScript Calculator(radio button)

HTML CODE <div class="box"> <h2>calculator</h2> <input type="text" id="number1" placeholder="number1"/><br> <input type="text" id="number2" placeholder="number2"/><br> <label><input type="radio" id="rad1" name="same" />Collection<br></label> <label><input type="radio" id="rad2" name="same" />Extraction<br></label> <label><input type="radio" id="rad3" name="same" />Multiplication<br></label> <label><input type="radio" id="rad4" name="same" />Division<br></label> <input type="button" id="but" value="calculate" /> <div id="res"></div> </div> CSS CODE: body{ margin:0; padding:0; background:#262626; text-transform:uppercase; font-family:'AR JULIAN'; font-size:14px; } h2{ font-size:28px; padding:0;... Continue Reading →

Object Inside Function

JavaScript object properties can also be defined as functions and is a widely used way. var calculate = { collection: function (n1, n2) { return n1 + n2; }, extraction: function (n1, n2) { return n1 - n2; }, pow: function (n1, n2) { return n1 * n2; }, division: function (n1, n2) { return... Continue Reading →

Create a website or blog at WordPress.com

Up ↑

Design a site like this with WordPress.com
Get started