html简易计算器的前端代码

<!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>无标题文档</title>
<script type="text/javascript">

function connectionDigital(control)
{
var txt = document.getElementById('txtScream');
}

</script>
</head>

<body>


<table width="138" border="1">
 <tr width="200">
 <td height="30" colspan="4"><input type="text" name="txtScream" id="txtScream" style="width:130px; height:25px;border-style:none; text-align:right;" readonly="readonly" /></td>
 </tr>
  <tr>
    <td width="24"><input name="1" type="button" id="1" value ="1" οnclick="connectionDigital(this)"/></td>
    <td width="30"><input name="2" type="button" id="2" value ="2" οnclick="connectionDigital(this)"/></td>
    <td width="31"><input name="3" type="button" id="3" value ="3" οnclick="connectionDigital(this)"/></td>
    <td width="25"><input name="+" type="button" id="+" value ="+" οnclick="connectionDigital(this)"/></td>
  </tr>
  <tr>
    <td><input name="4" type="button" id="4" value ="4" οnclick="connectionDigital(this)"/></td>
    <td><input name="5" type="button" id="5" value ="5" οnclick="connectionDigital(this)"/></td>
    <td><input name="6" type="submit" id="6" value ="6" οnclick="connectionDigital(this)"/></td>
    <td><input name="-" type="button" id="-" value ="-" οnclick="connectionDigital(this)"/></td>
  </tr>
  <tr>
    <td><input name="7" type="button" id="7" value ="7" οnclick="connectionDigital(this)"/></td>
    <td><input name="8" type="button" id="8" value ="8" οnclick="connectionDigital(this)"/></td>
    <td><input name="9" type="button" id="9" value ="9" οnclick="connectionDigital(this)"/></td>
    <td><input name="*" type="button" id="*" value ="*" /></td>
  </tr>
  <tr>
    <td><input name="0" type="button" id="0" value ="0" οnclick="connectionDigital(this)"/></td>
    <td colspan="2"><input name="=" type="button" id="=" value ="=" /></td>
    <td><input name="/" type="button" id="/" value ="/" /></td>
  </tr>
</table>
<p>&nbsp;</p>

</body>
</html>

转载于:https://www.cnblogs.com/helloaworld/p/5498103.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值