购物简易计算器

<!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>
<style type="text/css">
*{ margin:0; padding:0;}
body{ font-size:12px; color:#333; font-family:"宋体";}
table{ margin:30px auto 0 auto; background:#CFF;}
tr{ height:26px; line-height:26px;}
</style>
</head>
<body>
<form action="#" method="post">
  <table width="300">
    <tr>
      <td>&nbsp;<img src="images/shop.gif" width="54" height="54" /></td>
      <td>&nbsp;<strong>购物简易计算器</strong></td>
    </tr>
    <tr>
      <td>&nbsp;第一个数:</td>
      <td>&nbsp;
        <input type="text" name="txtCon1" id="txtOne" /></td>
    </tr>
    <tr>
      <td>&nbsp;第二个数:</td>
      <td>&nbsp;
        <input type="text" name="txtCon2" id="txtTwo" /></td>
    </tr>
    <tr>
      <td colspan="2">
      	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;<input type="button"  value="   +   "/>
        &nbsp;<input type="button"  value="   -   "/>
        &nbsp;<input type="button"  value="   *   "/>
        &nbsp;<input type="button"  value="   /   "/>
      </td>
    </tr>
    <tr>
      <td>&nbsp;计算结果:</td>
      <td>&nbsp;<input type="text" name="txtCom" id="txtCom" /></td>
    </tr>
  </table>
</form>
</body>
</html>

 

效果图:

心得:我是一名初学者,希望在JavaScript这方面学得越来越好。也希望我能在编程方面有所成就,这条路我会一直走下去的。我是一名编程员,我也是一名商人。

 

以利为先,以道为远。——chaoyi

 

个人E-mail:chaoyi77@163.com

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值