Answers for "use js function in html"

1

how to use js in html

<script>
  function alert () {
    alert("Javascript has started");
  }
</script>
Posted by: Guest on September-08-2021
3

how to use javascript in html

<!-- If JS is in external file: -->
<script src="filename.js" charset="utf-8"></script>

<!-- If you want JS in the your HTML file -->
<script>
  /*Your JS Code Here*/
</script>
Posted by: Guest on June-30-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language