基于js白色简洁样式计算器

今天给大家分享一款白色简洁样式计算器JS代码是一款精美简洁计算器JS代码插件网页特效,软件应用,后台应用JS计算器插件代码免费下载。适用浏览器:360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗. 不支持IE8及以下浏览器。

在线预览   源码下载

实现的代码。

html代码:

<div id="calcuator">
        <input type="text" id="input-box" value="0" size="21" maxlength="21" readonly="readonly" />
        <div id="btn-list">
            <div onclick="operator('clear')" class=" btn-30 btn-radius color-red clear-marginleft">
                C</div>
            <div onclick="operator('opposite')" class=" btn-30 btn-radius color-blue">
                +/-</div>
            <div onclick="operator('percent')" class=" btn-30 btn-radius color-blue">
                %</div>
            <div onclick="operator('backspace')" class=" btn-70 btn-radius color-red font-14">
                ←</div>
            <div onclick="typetoinput('7')" class=" btn-30 btn-radius clear-marginleft">
                7</div>
            <div onclick="typetoinput('8')" class=" btn-30 btn-radius">
                8</div>
            <div onclick="typetoinput('9')" class=" btn-30 btn-radius">
                9</div>
            <div onclick="operator('plus')" class=" btn-30 btn-radius color-blue font-14">
                +</div>
            <div onclick="operator('minus')" class=" btn-30 btn-radius color-blue font-14">
                -</div>
            <div onclick="typetoinput('4')" class=" btn-30 btn-radius clear-marginleft">
                4</div>
            <div onclick="typetoinput('5')" class=" btn-30 btn-radius">
                5</div>
            <div onclick="typetoinput('6')" class=" btn-30 btn-radius">
                6</div>
            <div onclick="operator('multiply')" class=" btn-30 btn-radius color-blue font-14">
                ×</div>
            <div onclick="operator('divide')" class=" btn-30 btn-radius color-blue font-12">
                ÷</div>
            <div onclick="typetoinput('1')" class=" btn-30 btn-radius clear-marginleft">
                1</div>
            <div onclick="typetoinput('2')" class=" btn-30 btn-radius">
                2</div>
            <div onclick="typetoinput('3')" class=" btn-30 btn-radius">
                3</div>
            <div onclick="operator('pow')" class=" btn-30 btn-radius color-blue font-14">
                ×2</div>
            <div onclick="operator('sqrt')" class=" btn-30 btn-radius color-blue font-12">
                √</div>
            <div onclick="typetoinput('0')" class=" btn-70 btn-radius clear-marginleft">
                0</div>
            <div onclick="typetoinput('.')" class=" btn-30 btn-radius">
                .</div>
            <div onclick="operator('result')" class=" btn-70 btn-radius color-red font-14">
                =</div>
        </div>
    </div>

via:http://www.w2bc.com/Article/25923

在线预览    源码下载

爱编程-编程爱好者经验分享平台
版权所有 爱编程 © Copyright 2012. All Rights Reserved.
闽ICP备12017094号-3