包含下列文件添加到你的页面
<link href="path_to/jcalculator.css" rel="stylesheet" type="text/css"> <-- jQuery library --> <script type="text/javascript" src="path_to/jquery.js"></script> <script type="text/javascript" src="path_to/jcalculator.min.js"></script>
html所需要用到的输入框
<input id="testinput" type="text" placeholder="click here to see the magic" />
调用jCalculator插件。
<script type="text/javascript"> $('#testinput').calculator(); </script>