JavaScript Introduction

JavaScript Introduction



What is java script ?

Javascript was initially made for this. So that it keeps web pages alive.
Javascript is designed to create network-centric applications and is considered and integrated with Java programming language. Javascript is a very powerful (client-side scripting) language that holds great importance in web programming. Javascript is used primarily in HTML to increase the contact of a user with a web page. It is a good way to do this. In other words, you can make your web page more vibrant and interactive with the help of javascript, which is also very important for a web page. Javascript is very easy to implement because it integrates with HTML. And this is an open and cross platform with a power specialty.

JavaScript Introduction

Javascript history

Javascript was developed in 1995, and it was developed by Brendan Eich, who had developed a popular browser Netscape at that time.

Brendan Eich
Brendan Eich - creator of JavaScript


Javascript language was initially known as live script, and later changed its name to javascript. You will have many types of programmers who think that the JavaScript language and the Java programming language are the same. In fact, javascript and java are very unrelated. Java is a very complicated programming language, which is very difficult to learn. While learning javascript and a scripting language is simple. Javascript language syntax will look like a C programming language. If you have ever learned a c programming language, you know it.



How to run javascript?
Because JavaScript is a scripting language, Javascript is unable to run automatically. In fact, the browser itself is responsible for running the javascript code. When a user requests an HTML language page with the JavaScript language, then the script is sent to the browser at that time, and it depends on the browser to execute it. The main advantage of the JavaScript language is that all modern types of web browsers support JavaScript language. Therefore, you do not have to worry about any kind, whether your site visitor uses Internet Explorer, Google Chrome, Firefox, Opera, or any other browser. Javascript language will be supported. In addition, the Javascript language runs on any operating system including Windows, Linux or Mac. In this way, Javascript receives the conquest of the main disadvantage of VBSScript (now deprecated)


Javascript editor tool
To get you started JavaScript, in order to display the web page you have developed, you need a text editor to write your code and browser. You can use it as if you like Notepad ++, Notepad, Visual Studio Code, Sublime Text, Atom or any other text editor and which is a text editor, in which you are comfortable. You can use any web browser, including Google Chrome, Firefox, Microsoft Age, Internet Explorer, OperaMini and so on to run JavaScript.


Javascript program
If you want to put your Javascript code in the HTML document, then you have to put your Javascript code in the HTML document in the <script> tag (the <script> start tag and </ script> end tag). This tag helps your browser distinguish the JavaScript code you create from the rest of the HTML code. You have to use the Type attribute inside the <script> tag, and its value has to be set to text / JavaScript:
Example-


<!DOCTYPE html>
<html>
   <body>
      <script language="javascript" type="text/javascript">
         alert("Hello World!");
      </script>
   </body>
</html>



Javascript can change HTML styles (CSS)
Javascript twist Changing the style of an HTML element, there is a version of changing an HTML attribute, you can understand it with the following example:
Example-



<!DOCTYPE html>
<html>
<body>
<h2>JavaScript</h2>
<p id="Exm">JavaScript change the style of HTML element.</p>
<button type="button" onclick="document.getElementById('Exm').style.fontSize='35px'">Click Me!</button>
</body>
</html>



Javascript can hide HTML elements
Hide HTML Elements Using Javascript By changing the display style you can understand it with the help given below:
Example-



<!DOCTYPE html>
<html>
<body>
<h2>Javascript can hide HTML elements.</h2>
<p id="Exm">Hide HTML Elements Using Javascript By changing the display style.</p>
<button type="button" onclick="document.getElementById('Exm').style.display='none'">Click Me!</button>
</body>
</html>




Javascript can show HTML elements
With the help of javascript, you can also change the display style to hide hidden HTML elements. You can understand it with the help given below:
Example-



<!DOCTYPE html>
 <html>
 <body>
 <h2>Javascript can show HTML elements</h2>
 <p>With the help of javascript, you can also change the display style to hide hidden HTML elements.</p>
<p id="Exm" style="display:none">Hello JavaScript! i am hear.</p>
<button type="button" onclick="document.getElementById('Exm').style.display='block'">Click Me!</button>
</body>
</html>



Javascript was initially made for this. So that it keeps web pages alive. Javascript is designed to create network-centric applications and is considered and integrated with Java programming language. Javascript is a very powerful (client-side scripting) language that holds great importance in web programming. Javascript is used primarily in HTML to increase the contact of a user with a web page. It is a good way to do this.

Post a Comment

[blogger]

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget