Document.getElementsByTagName()

With the "getElementsByTagName" method we can access the html tags. var elements = document.getElementsByTagName(name); "document.getElementById()" difference: Thanks to "document.getElementById() " we could reach the tags with id. With the "getElementsByTagName" method we can access the html tags. id is given a single value. But the labels are not the only one. A code array can... 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 →

Create a website or blog at WordPress.com

Up ↑

Design a site like this with WordPress.com
Get started