vue-calc is a small calculator app for Vue 3 that displays the sum of the numbers you’ve typed into an input field.
simple calculator using javascript, create a simple calculator using javascript, javascript calculator github
A simple Piano Keyboard Like Calculator App in jQuery | Pianolator
How to make use of it:
Install & Download
<section id="loader" class='loader' >loading . . . </section>
Vue.createApp({ data () { return { del: localStorage.delActive ? localStorage.delActive : false, label: '', item: '', items: [] } }, watch: { del (value) { localStorage.delActive = value } }, computed: { sum () { return this.items.length > 0 ? this.items.reduce((o, n) => (o = o + n)) : 0 } }, mounted () { this.focus(); document.getElementById("loader").style.display="none"; }, methods: { addItem () { this.item = eval(this.item.replace(/[^-()\d/*+.]/g, '')) //parse the math expression, but sanitize it if (!isNaN(this.item) && this.item!=0) { this.items.unshift(this.item * 1) //or push - whatever works for you } this.item = '' }, removeItem (n) { this.items.splice(n, 1) }, undoAddition () { if (this.del) { this.item == '' ? this.items.shift() : false this.focus() } }, focus () { this.item = '' this.$refs.n.focus() } } }).mount('#app')
Basic Calculator App, vue-calc Plugin/Github
See Demo And Download
Official Website(hasinhayder): Click Here
This superior jQuery/javascript plugin is developed by hasinhayder. For extra Advanced usage, please go to the official website.