0

Java script

What are some of the ways java script can be implemented in a HTML page?

9th Apr 2018, 12:17 PM
Onyhi
3 Réponses
+ 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>
9th Apr 2018, 12:51 PM
Rizvan Kukad
+ 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
9th Apr 2018, 12:51 PM
Lord Krishna
Lord Krishna - avatar
+ 2
Thanks
9th Apr 2018, 12:56 PM
Onyhi