IXC
0
Q:

call javascript function from html

function runFunction() {
  myFunction();
}

function myFunction() {
  alert("runFunction made me run");
}

runFunction();
1
<!-- Answer to: "call javascript function from html" -->

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

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


<marquee>
  Hello!
  <script>heyFunc(World);</script> <!-- Returns: "Hello World!" -->
</marquee>
-1

New to Communities?

Join the community