设置计算器外框架在设置计算器数值输入键位还有四则运算等键位
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>计算器制作</title>
<link rel="stylesheet" type="text/css" href="jisuanqi1.css">
</head>
<body onload="init(),init_dodoke()">
<div id="div1">
<div class="jojo">
<div id="div2">
<form>
<input type="text" name="num" id="num">
</form>
</div>
<div id="div3">
<form>
<input type="button" value="C" id="" />
<input type="button" value="←" id="" />
<input type="button" value="+/-" id="" />
<input type="button" value="/" id="" />
<input type="button" value="7" id="" />
<input type="button" value="8" id="" />
<input type="button" value="9" id="" />
<input type="button" value="*" id="" />
<input type="button" value="4" id="" />
<input type="button" value="5" id="" />
<input type="button" value="6" id="" />
<input type="button" value="-" id="" />
<input type="button" value="1" id="n1" />
<input type="button" value="2" id="" />
<input type="button" value="3" id="" />
<input type="button" value="+" id="" />
<input type="button" value="0" id="" />
<input type="button" value="." id="" />
<input type="button" value="=" id="" />
<input type="button" value="D" id="dodoke" />
</form>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="jisuanqi1.js"></script>
</html>
<!-- 小数点减号存在bug -->