今天给大家分享jQuery数学计算器html的源代码:(源码来自网络,分享给大家)
先看一下效果图:
html代码:
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>jQuery计算器代码</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<link href="css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/demo.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container">
<!-- Rounded switch -->
<label class="switch">
<input type="checkbox">
<span class="slider"></span>
</label>
<form>
<input readonly id="display1" type="text" class="form-control-lg text-right">
<input readonly id="display2" type="text" class="form-control-lg text-right">
</form>
<div class="d-flex justify-content-between button-row">
<button id="left-parenthesis" type="button" class="operator-group">(</button>
<button id="right-parenthesis" type="button" class="operator-group">)</button>
<button id="square-root" type="button" class="operator-group">√</button>
<button id="square" type="button" class="operator-group">x²</button>
</div>
<div class="d-flex justify-content-between button-row">
<button id="clear" type="button">C</button>
<button id="backspace" type="button">⌫</button>
<button id="ans" type="button" class="operand-group">Ans</button>
<button id="divide" type="button" class="operator-group">÷</button>
</div>
<div class="d-flex justify-content-between button-row">
<button id="seven" type="button" class="operand-group">7</button>
<button id="eight" type="button" class="operand-group">8</button>
<button id="nine" type="button" class="operand-group">9</button>
<button id="multiply" type="button" class="operator-group">×</button>
</div>
<div class="d-flex justify-content-between button-row">
<button id="four" type="button" class="operand-group">4</button>
<button id="five" type="button" class="operand-group">5</button>
<button id="six" type="button" class="operand-group">6</button>
<button id="subtract" type="button" class="operator-group">−</button>
</div>
<div class="d-flex justify-content-between button-row">
<button id="one" type="button" class="operand-group">1</button>
<button id="two" type="button" class="operand-group">2</button>
<button id="three" type="button" class="operand-group">3</button>
<button id="add" type="button" class="operator-group">+</button>
</div>
<div class="d-flex justify-content-between button-row">
<button id="percentage" type="button" class="operand-group">%</button>
<button id="zero" type="button" class="operand-group">0</button>
<button id="decimal" type="button" class="operand-group">.</button>
<button id="equal" type="button">=</button>
</div>
</div>
<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="js/math.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>
该计算器源码还有几个JavaScript和css文件,
由于文件较多,文章篇幅有限,后续我打包上传到优快云中供大家下载。
如果大家不想用积分下载也可以点赞评论留下邮箱我发给你。
下载链接:https://download.youkuaiyun.com/download/qq_44394562/19137016?spm=1001.2014.3001.5501