0
Java script
What are some of the ways java script can be implemented in a HTML page?
3 Respostas
+ 1
There are 3 ways to implement JavaScript in web page.
1. inline: you can write JavaScript in evenhandler like onclick="Foo()".
2. internal: you can write JavaScript in script tag for example <script>alert('foo')</script>
3. external: either you can include external js file in your webpage with script tag
<script src='main.js'></script>
+ 3
It can be inline inside html tags, internal in script tags or in an external script.
Inline html:<p onclick= "alert('hi, js')"></p>
Internal in script tags:
<script>
alert('hi, js from script')
</script>
External from another .js file
<script src="my_cool_external_js_file.js">
</script>
For more detailed info check the search results for question.
https://start.duckduckgo.com/?q=+javascript+be+embeding+in+html
+ 2
Thanks