Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update calculator.html #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Animation Button 2/animationRadioButton.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>

<html>
<head>
Expand All @@ -9,7 +9,7 @@
</head>
<body>

<h1>animation radio button</h1>
<h1>Animation radio button</h1>
<div id="radio_buttons">
<input type="radio" name="sec" id="input1" />
<label for="input1"></label>
Expand Down
50 changes: 29 additions & 21 deletions calculator.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@
margin-bottom: 10px;
text-align:center;
width: 210px;
color:green;
color:rgb(0, 0, 0);
border: solid black 2px;
padding: 3px 33px 4px 24px;

}

input[type="button"]
{
background-color:green;
background-color:rgb(238, 207, 219);
color: black;
border: solid black 2px;
width:100%
Expand All @@ -45,26 +47,31 @@
border: solid black 2px;
width:100%
}
.border{
border: 2px;
color: black;
}
</style>
</head>
<!-- create table -->
<body>
<div class = title >HTML Calculator</div>
<table border="1">
<tr>
<td colspan="3"><input type="text" id="result"/></td>
<!-- clr() function will call clr to clear all value -->
<td><input type="button" value="c" onclick="clr()"/> </td>
</tr>
<tr>
<!-- create button and assign value to each button -->
<!-- dis("1") will call function dis to display value -->
<td><input type="button" value="1" onclick="dis('1')"/> </td>
<td><input type="button" value="2" onclick="dis('2')"/> </td>
<td><input type="button" value="3" onclick="dis('3')"/> </td>
<td><input type="button" value="/" onclick="dis('/')"/> </td>
</tr>
<tr>
<div class="border">
<div class = title >HTML Calculator</div>
<table border="1">
<tr>
<td colspan="3"><input type="text" id="result"/></td>
<!-- clr() function will call clr to clear all value -->
<td><input type="button" value="c" onclick="clr()"/> </td>
</tr>
<tr>
<!-- create button and assign value to each button -->
<!-- dis("1") will call function dis to display value -->
<td><input type="button" value="1" onclick="dis('1')"/> </td>
<td><input type="button" value="2" onclick="dis('2')"/> </td>
<td><input type="button" value="3" onclick="dis('3')"/> </td>
<td><input type="button" value="/" onclick="dis('/')"/> </td>
</tr>
<tr>
<td><input type="button" value="4" onclick="dis('4')"/> </td>
<td><input type="button" value="5" onclick="dis('5')"/> </td>
<td><input type="button" value="6" onclick="dis('6')"/> </td>
Expand All @@ -83,6 +90,7 @@
<td><input type="button" value="=" onclick="solve()"/> </td>
<td><input type="button" value="*" onclick="dis('*')"/> </td>
</tr>
</table>
</body>
</html>
</div>
</table>
</body>
</html>