how to call javascript function in html?

Posted by pavan - 1 year ago

how to call javascript function in html

<!-- Answer to: "call javascript function from html" -->

<!-- Just call it from a <script> tag: -->

<!--
JavaScript:
  function LoveFunction(a) {
    console.log(`Welcome ${a}!`);
  };
-->


<marquee>
  Welcome!
  <script>LoveFunction(Pakainfo);</script> <!-- Returns: "Welcome Pakainfo!" -->
</marquee>