Last active
August 29, 2015 14:08
-
-
Save Karlina-Bytes/5760a5656601c1a94a87 to your computer and use it in GitHub Desktop.
A user interface for a numerical base converter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--****************************************************** | |
* BaseConvert.html | |
* Created by Karlina Beringer | |
* Updated October 17, 2014 | |
* Converts between multiple numerical bases, | |
* namely bases two through sixteen. | |
****************************************************** | |
--> | |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title> Base Converter </title> | |
</head> | |
<body> | |
<!--********************************************************* | |
* The code below generates the user interface for | |
* a multi-base converter for bases two through sixteen. | |
**********************************************************--> | |
<div class="well" style="background-color:#99FF00"> | |
<!-- Display a title and subtitle. --> | |
<h3>Base Converter</h3> | |
<h4><em>Converts between bases two through sixteen.</em></h4> | |
<div style="padding:5px"></div> | |
<!-- User enters a number to convert. --> | |
<h4>1) Enter a positive integer in the field below.</h4> | |
<input type="text" id="startField" placeholder="Start Value"/> | |
<!-- User selects a base to convert FROM. --> | |
<h4>2) Select the base for the number entered.</h4> | |
<select id="startBaseSelect"> | |
<option value="2" selected>Binary (Base 2)</option> | |
<option value="3">Ternary (Base 3)</option> | |
<option value="4">Quaternary (Base 4)</option> | |
<option value="5">Quinary (Base 5)</option> | |
<option value="6">Senary (Base 6)</option> | |
<option value="7">Septenary (Base 7)</option> | |
<option value="8">Octal (Base 8)</option> | |
<option value="9">Nonary (Base 9)</option> | |
<option value="10">Decimal (Base 10)</option> | |
<option value="11">Undecimal (Base 11)</option> | |
<option value="12">Duodecimal (Base 12)</option> | |
<option value="13">Tridecimal (Base 13)</option> | |
<option value="14">Tetradecimal (Base 14)</option> | |
<option value="15">Pentadecimal (Base 15)</option> | |
<option value="16">Hexadecimal (Base 16)</option> | |
</select> | |
<!-- User selects a base to convert TO. --> | |
<h4>3) Select the base to convert to.</h4> | |
<select id="endBaseSelect"> | |
<option value="2" selected>Binary (Base 2)</option> | |
<option value="3">Ternary (Base 3)</option> | |
<option value="4">Quaternary (Base 4)</option> | |
<option value="5">Quinary (Base 5)</option> | |
<option value="6">Senary (Base 6)</option> | |
<option value="7">Septenary (Base 7)</option> | |
<option value="8">Octal (Base 8)</option> | |
<option value="9">Nonary (Base 9)</option> | |
<option value="10">Decimal (Base 10)</option> | |
<option value="11">Undecimal (Base 11)</option> | |
<option value="12">Duodecimal (Base 12)</option> | |
<option value="13">Tridecimal (Base 13)</option> | |
<option value="14">Tetradecimal (Base 14)</option> | |
<option value="15">Pentadecimal (Base 15)</option> | |
<option value="16">Hexadecimal (Base 16)</option> | |
</select> | |
<!-- User clicks a button to start calculations. --> | |
<h4>4) Click "Convert" when ready.</h4> | |
<input type="button" | |
id="convertButton" | |
class="btn btn-primary" | |
value="Convert" | |
onclick="buttonClick()"/> | |
<div style="padding:10px"></div> | |
<!-- Display the results of the calculations. --> | |
<div class="well" | |
style="background-color:#00FF33;display:none;" | |
id="resultArea"> | |
</div> | |
</div> | |
<!-- Reference a JavaScript file in the same directory. --> | |
<script src="functions.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment