Kilometers/Miles Converter

Kilometers/Miles Converter using Javascript

This simple Program will take input in Kilometers and convert it to Miles and vice versa.

HTML with Javascript

<!DOCTYPE html>
<title>Kilometers/Miles Converter</title>
<body bgcolor="lightgreen">

<h2>Kilometers/Miles Converter</h2>
<p>Type a value in Kilometers to convert to Miles:</p>

  <input id="k" type="number" placeholder="000" oninput="Convert(this.value)" onchange="Convert(this.value)">
<p>Miles: <span id="Miles"></span></p>

function Convert(km) {

<p>Type a value in Miles to convert to Kilometers:</p>

  <input id="m" type="number" placeholder="000" oninput="ConvertM(this.value)" onchange="ConvertM(this.value)">
<p>Kilometers: <span id="km"></span></p>

function ConvertM(m) {


Click here to run this Code

Share with Friends

Twitter Facebook Google LinkedIn Email Pinterest Reddit StumbleUpon Tumblr

Try these Fun Games by Bobbie:

Travel Blast Game New York

Play and Learn Russian

Battlestarship Game

Take a look at these Groovy Codes:

Fun IQ Test

Html Svg Starburst

Javascript Particles Fishes

Read the Latest Breaking Programming and Tech News, Great Articles and Tips:

Codenewz Programming and Tech News


Popular posts from this blog

Multi-tap Keypad Text Entry

HTML5 Crossword 1