Professional Documents
Culture Documents
Pakidesignan Nalang
Pakidesignan Nalang
DOCTYPE html>
<html>
<head>
<!-- <link rel="stylesheet" href="style.css"> -->
</head>
<body>
<!-- the textbox. -->
<input class="textbox" type="text" id="input">
<p id="isDivide"></p>
<p id="isMultiply"></p>
<p id="isMinus"></p>
<p id="isPlus"></p>
<p id="isFirstValue"></p>
<p id="firstValue"></p>
<p id="secondValue"></p>
if(isFirstValue == true){
firstValue += ".";
}else{
secondValue += ".";
input.value += ".";
}
if(isFirstValue == true){
firstValue += 0;
}else{
secondValue += 0;
input.value +=0;
}
if(isFirstValue == true){
firstValue += 1;
}else{
secondValue += 1;
input.value += 1;
}
if(isFirstValue == true){
firstValue += 2;
}else{
secondValue += 2;
}
input.value += 2;
}
if(isFirstValue == true){
firstValue += 3;
}else{
secondValue += 3;
input.value += 3;
if(isFirstValue == true){
firstValue += 4;
}else{
secondValue += 4;
input.value += 4;
if(isFirstValue == true){
firstValue += 5;
}else{
secondValue += 5;
input.value += 5;
if(isFirstValue == true){
firstValue += 6;
}else{
secondValue += 6;
input.value += 6;
if(isFirstValue == true){
firstValue += 7;
}else{
secondValue += 7;
input.value += 7;
if(isFirstValue == true){
firstValue += 8;
}else{
secondValue += 8;
input.value += 8;
}
if(isFirstValue == true){
firstValue += 9;
}else{
secondValue += 9;
}
input.value += 9;
input.value = null;
firstValue = "";
secondValue = "";
//function to divide.
function divide(){
input.value += "/";
isDivide = true;
isFirstValue = false;
//function to multiply.
function multiply() {
input.value += "*";
isMultiply = true;
isFirstValue = false;
//function to subtract.
function minus(){
input.value += "-";
isMinus = true;
isFirstValue = false;
//function to add.
function plus(){
input.value += "+";
//to know that the operation is addition
isPlus = true;
isFirstValue = false;
function equals(){
}else{
firstValue = answer;
secondValue = "";
</script>
</body>
</html>