Answers for "javascript with html"

9

javascript with html

// this how add javascript file in html !!


<script type="text/javascript" src="yourJavascript.js"></script>
Posted by: Guest on May-31-2021
19

how to use javascript in html

<!-- include an external javascript document -->
<script src="myJavaScript.js" charset="utf-8"></script>

<!-- JavaScript inside html element -->
<script>
  console.log("This is JavaScript");
</script>
Posted by: Guest on October-29-2020
2

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
0

how to enter javascript in html

<script type="text/javascript">
  alert("This alert box was called with the onload event");
</script>
Posted by: Guest on August-19-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language