网站首页  汉语字词  英语词汇  考试资料  写作素材

请输入您要查询的范文:

 

标签的border 样式在浏览器中显示不出来的解决方法
  • 剖析标注HTML元素时class比id所具有的优势
  • Table显示你要显示的边框代码
  • 点击按钮文字变成input框,点击保存变成文字的实现代码
  • 关于table表格中的内容溢出布局方法
  • html的footer置于页面最底部的简单实现方法
  • 移动端网页大小自适应的实现方法
  • 如何实现textarea中获取动态剩余字数的方法
  • PHP-HTMLhtml重要知识点笔记(必看)
  • 举例讲解HTML中iframe和frame的区别
  • dedecms上一篇下一篇调用图片的方法
  • 项目中碰到的css兼容问题小结
  • html的结束标签问题与w3c标准
  • dede如何按自己写的id进行排序
  • html知识点实践经验总结
  • ecshop 去除版权的设置技巧
  • 批量删除wordpress博客中的垃圾评论
  • dede中统计栏目文章数的两种方法
  • appeal to
  • apply for
  • apply to
  • approve of
  • approximate to
  • argue about/over
  • argue against
  • argue away
  • argue down
  • argue for
  • 祠庙
  • 祢
  • 祢
  • 祢1
  • 祢2
  • 祥
  • 祥云
  • 祥和
  • 祥瑞
  • 祥风
  • 哈尔滨石油学院2015年山东省艺术类校考成绩
  • 宁波大学2015年专升本录取查询开通
  • 温州大学瓯江学院2015年招生政策
  • 杭州电子科技大学信息工程学院2015年招生章程
  • 浙江大学宁波理工学院新增1个本科第一批次招生专业(生物工程专业)
  • 浙江财经大学2015年招生章程
  • 绍兴文理学院2015年普通本专科招生章程
  • 绍兴文理学院元培学院2015年招生章程
  • 2015年六安市裕安区高校专项计划名单公示表
  • 台州学院2014年分省分专业录取情况表
  • 标题 HTML实现简单计算器附详细思路
    分类 范文、应用文-IT技术专栏-网页制作
    范文
        代码如下:
        <!DOCTYPE html>
        <html>
        <meta name="content-type" content="text/html; charset=UTF-8">
        <head>
        <title>Calculator</title>
        <!--将按键内容以字符串形式存储在文字框中当按钮为“=”时,调用eval方法计算结果然后将结果输出文字框中-->
        <script type="text/javascript">
        var numresult;
        var str;
        function onclicknum(nums) {
        str = document.getElementById("nummessege");
        str.value = str.value + nums;
        }
        function onclickclear() {
        str = document.getElementById("nummessege");
        str.value = "";
        }
        function onclickresult() {
        str = document.getElementById("nummessege");
        numresult = eval(str.value);
        str.value = numresult;
        }
        </script>
        </head>
        <body bgcolor="affff" >
        <!--定义按键表格,每个按键对应一个事件触发-->
        <table bgColor="#bbff77"
        style="height: 350px; width: 270px">
        <tr>
        <td colspan="4">
        <input type="text" id="nummessege"
        style="height: 90px; width: 350px; font-size: 50px" />
        </td>
        </tr>
        <tr>
        <td>
        <input type="button" value="1" id="1" onclick="onclicknum(1)"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="2" id="2" onclick="onclicknum(2)"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="3" id="3" onclick="onclicknum(3)"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="+" id="add" onclick="onclicknum('+')"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        </tr>
        <tr>
        <td>
        <input type="button" value="4" id="4" onclick="onclicknum(4)"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="5" id="5" onclick="onclicknum(5)"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="6" id="6" onclick="onclicknum(6)"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="-" id="sub" onclick="onclicknum('-')"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        </tr>
        <tr>
        <td>
        <input type="button" value="7" id="7" onclick="onclicknum(7)"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="8" id="8" onclick="onclicknum(8)"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="9" id="9" onclick="onclicknum(9)"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="*" id="mul" onclick="onclicknum('*')"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        </tr>
        <tr>
        <td colspan="2">
        <input type="button" value="0" id="0" onclick="onclicknum(0)"
        style="height: 70px; width: 190px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="." id="point" onclick="onclicknum('.')"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        <td>
        <input type="button" value="/" id="division"
        onclick="onclicknum('/')"
        style="height: 70px; width: 90px; font-size: 35px">
        </td>
        </tr>
        <tr>
        <td colspan="2">
        <input type="button" value="Del" id="clear"
        onclick="onclickclear()"
        style="height: 70px; width: 190px; font-size: 35px" />
        </td>
        <td colspan="2">
        <input type="button" value="=" id="result"
        onclick="onclickresult()"
        style="height: 70px; width: 190px; font-size: 35px" />
        </td>
        </tr>
        </table>
        </body>
        </html>
        名单
    随便看

     

    客官网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。

     

    Copyright © 2002-2024 cumcu.com All Rights Reserved
    更新时间:2026/10/29 9:28:57