Sunday, 25 June 2017

Javascript Intoduction


What is javascript ?
JavaScript is a programming language, which is used to interact with the web pages in browsers and can make it dynamic. The browser acts like a runtime environment for JavaScript language.
                Javascript is a interpreted language, which doesn’t require any forceful compilation. Instead it directly goes for the execution process. Javascript is also an Object-Oriented programming language(Prototype based).
The browser reads our HTML code and creates a DOM tree, means here our code gets in the form of objects.
The page gets rendered only after formation of the DOM tree.
Javascript is the language where we can modify this static content of DOM as dynamic. Means by using javascript we can modify our page behavior.

HTML Content DOM Objects
<html>
<head>
</head>
<body>
<p>abc</abc
</body>
</html>
Browser creates list of objects like : html,head,body and para

By using javascript we can edit or update the values of HTML elements, element attributes, element css and more that can perform wherever the chances to update the functionality of a web page.

Prerequisites to work locally : Browser and text editor(Note pad,note pad++,…)

The code that belongs to javascript should be enclosed in between the script tag.
Ex:  <script> alert('welcome to javascrit')  </script>