Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

218
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda