tasarım kısımlarını atlarsanız ödev olarak verilmiş hesap makinası
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hesap Makinası</title>
<style type="text/css">
body {
text-align: center;
font: 18px Tahoma, Geneva, sans-serif;
}
input[type="button"] {
border: 1px solid #666;
width: 50px;
padding: 7px;
margin: 2px;
background-color: #666;
color: #FFF;
font-weight: bold;
font-size: 24px;
text-align: center;
}
input[type="button"]:hover {
border: 3px solid #333;
width: 50px;
padding: 5px;
margin: 2px;
cursor: pointer;
background-color: #CCC;
color: #C00;
}
input[type="text"] {
border: 3px solid #666;
width: 250px;
padding: 5px;
margin: 2px;
font-size: 18px;
font-weight: bold;
color: #C00;
}
table {
border: 1px solid #CCC;
}
</style>
</head>
<body>
Hesap Makinası
<form name="Calc">
<table width="286" height="227" align="center" cellpadding="0" cellspacing="8">
<tr>
<td><input name="input" type="text" size="40" readonly="readonly">
<br></td>
</tr>
<tr>
<td align="center" valign="top"><input type="button" name="one" value=" 1 " onClick="Calc.input.value += '1'">
<input type="button" name="two" value=" 2 " onClick="Calc.input.value += '2'">
<input type="button" name="three" value=" 3 " onClick="Calc.input.value += '3'">
<input type="button" name="plus" value=" + " onClick="Calc.input.value += ' + '">
<br>
<input type="button" name="four" value=" 4 " onClick="Calc.input.value += '4'">
<input type="button" name="five" value=" 5 " onClick="Calc.input.value += '5'">
<input type="button" name="six" value=" 6 " onClick="Calc.input.value += '6'">
<input type="button" name="minus" value=" - " onClick="Calc.input.value += ' - '">
<br>
<input type="button" name="seven" value=" 7 " onClick="Calc.input.value += '7'">
<input type="button" name="eight" value=" 8 " onClick="Calc.input.value += '8'">
<input type="button" name="nine" value=" 9 " onClick="Calc.input.value += '9'">
<input type="button" name="times" value=" x " onClick="Calc.input.value += ' * '">
<br>
<input type="button" name="clear" value=" C " onClick="Calc.input.value = ''">
<input type="button" name="zero" value=" 0 " onClick="Calc.input.value += '0'">
<input type="button" name="DoIt" value=" = " onClick="Calc.input.value = eval(Calc.input.value)">
<input type="button" name="div" value=" / " onClick="Calc.input.value += ' / '">
<br></td>
</tr>
</table>
</form>
<p style="font-size:10px"><a href="http://www.mrflz.com" style="text-decoration: none; color: #666;" target="_blank">Emre Filiz</a> - <span style="color:#C00">1306020023</span> </p>
</body>
</html>
Those were the days guys...
|