- We use <script> tag to insert javascript to a HTML document. Inside the script tag we use Type attribute to define the scripting language. It is optional to use the attribute of Language to define the script language.
- JavaScript can be put under the header segment or body segment. Something needed to do before loading the page, you can define under header segment.Syntax:<script language = "javascript" type = "text/javascript" >------</script>
- Opening tag of <script language = "javascript" type = "text/javascript" > and the closing tag of </script> tells where the JavaScript starts and ends.
- To write some output to the HTML body we use standard JavaScript command of document.write()
Ex:<script language = "javascript" type = "text/javascript" >document.write("Hello!.. This is my 1st JavaScript Program");</script>
This blog supports beginners to get deep knowledge about programming in HTML, CSS, JavaScript, php, asp and other Web technologies and VB, VB.net, Java,step by step from the beginning. All the programming Concepts discuss with simple examples for the readability. Try out daily uploaded lessons to be a Programmer.
JavaScript Basic
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment