Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
Running a Javacript code on an HTML Page?

This is a ion exchange calculation for softener resin linked to my job. I've run this code in Javacript and displayed it on the console but where do you begin to run that on a webpage. I know how to link a JS file using the script on a HTML page but how does the code get executed. I'm a bit confused with getELement ID or querySelectors so i was hoping to get some pointers of where i can start to look. Apologies for the ametuer question

  const totalCapacity = function (resinVolume, hardness) {
  let exchange = 50;
  return (resinVolume * exchange) / hardness;
};

let softener = totalCapacity(50, 200);
console.log(softener + ' m3');
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

This is an immediately invoked function:

(const totalCapacity = function (resinVolume, hardness) {
  let exchange = 50;
  return (resinVolume * exchange) / hardness;
};
let softener = totalCapacity(50, 200);
console.log(softener + ' m3');)();
about 4 years ago · Juan Pablo Isaza Report

0

<script language = "JavaScript">
  function multiply() {
    with(document.multiplication) {
      result.value=x.value * y.value;
    }
  }
</script>

<form name="multiplication">
  <input type="text" name="x" size="5">
  <input type="text" name="y" size="5">
  <input type="text" name="result" size="5"><br>
<input type="button" value="Multiply" onClick="multiply()">

You can get some idea from the above example.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!