So,In this blog when ive put the code for html the html code cant be seen so i will put it in a .txt file ^^
The code above will produce this output on an HTML page:
Welcome
Example Explained
To insert a JavaScript into an HTML page, we use the tag (also use the type attribute to define the scripting language).
So, the and tells where the JavaScript starts and ends CLICK ME FOR THE EXAMPLE CODE
The word document.write is a standard JavaScript command for writing output to a page.
By entering the document.write command between the and tags, the browser will recognize it as a JavaScript command and execute the code line. In this case the browser will write Hello World! to the page:
CLICK ME FOR THE EXAMPLE CODE
Note: If we had not entered the tag, the browser would have treated the document.write(”welcome”) command as pure text, and just write the entire line on the page.
————————————————————————————————————
OR USING EXTERNAL SCRIPTS
and we can use external scripts which were uploaded in other host, right?
by adding src=”your script’s URL” inside your script code
don’t forget to end it with a
example:
CLICK ME FOR THE CODE