Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

jsCalc - JavaScript Calculation Library

jsCalc (based on jAutoCalc) is a lightweight JavaScript library for performing automatic calculations based on input values in a web page. This library is designed to replace the functionality of a jQuery-based script, providing a modern and dependency-free alternative.

Features

  • Automatic calculations based on input values.
  • Support for various mathematical functions (sum, average, min, max, count, etc.).
  • Customizable formatting options for result display.
  • Smart handling of integers and decimals.
  • Easy integration into your web page.

Usage

  1. Include the jsCalc script in your HTML file:

    <script src="path/to/jsCalc.js"></script>
  2. Add the jsCalc attribute to the HTML elements where you want automatic calculations:

    <input type="text" name="field1" jsCalc="sum({field2} * 2)">
    <input type="text" name="field2">
  3. Initialize jsCalc in your JavaScript:

 document.addEventListener('DOMContentLoaded', function () {
   document.querySelector('body').jsCalc();
 });

About

Perform basic Excel equations using form input fields.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages