求 计算器 简单的 加减乘除 功能 的代码

    <!-- 外部移动层JS -->
    <script language="javascript" src="src/js/yidong.js"></script>
    <!-- 外部计算功能JS -->
    <script language="javascript" src="src/js/jisuan.js"></script>
</head>
<style>
div{width:100%;height:800px;background:gray;}
</style>
<body bgcolor="teal"><center/>
    <div  onmousemove="mouseMove()">
    <div id="ceng" onmousedown="mouseDown()" onmouseup="mouseUp()" style="top:100px;left:400px;position:absolute;width:350px;height:420px;cursor:url(src/img/箭头-国旗.ani),defanlt;">简单的计算器
    <!-- 表单 -->
    <form>
    <!-- 层的边框大小样式颜色 -->
        <table id="tb" style="border:10px inset #88bef4" align="center">
                <td colspan="4">
                    <input type="text" id="kg"/>
                </td>
            </tr>
            <tr>
                <td><input type="button" value="1" id="kg1"/></td>
                <td><input type="button" value="2" id="kg1"/></td>
                <td><input type="button" value="3" id="kg1"/></td>
                <td><input type="button" value="+" id="kg1"/></td>
            </tr>
            <tr>
                <td><input type="button" value="4" id="kg1"></td>
                <td><input type="button" value="5" id="kg1"/></td>
                <td><input type="button" value="6" id="kg1"/></td>
                <td><input type="button" value="-" id="kg1"/></td>
            </tr>
            <tr>
                <td><input type="button" value="7" id="kg1"/></td>
                <td><input type="button" value="8" id="kg1"/></td>
                <td><input type="button" value="9" id="kg1"/></td>
                <td><input type="button" value="*" id="kg1"/></td>
            </tr>
            <tr>
                <td><input type="button" value="." id="kg1"/></td>
                <td><input type="button" value="0" id="kg1"/></td>
                <td><input type="button" value="%" id="kg1"/></td>
                <td><input type="button" value="/" id="kg1"/></td>
            </tr>
            <tr>
                <td><input type="button" value="C" id="kg1"/></td>
                <td><input type="button" value="←" id="kg1"/></td>
                <td colspan="2"><input type="button" value="=" id="kg2"/></td>

            </tr>

        </table>
        </form>
    </div>
    </div>
</body>

首先,一个页面中不要使用如此多的id。
一个原生js写的加减乘除运算