Javascript Introduction

Next




Javascript Introduction


Javascript is a lightweight programming language. It is designed for creating network-centric applications.In Website designing it is too much easy to implement javascript because we can implement javascript by using HTML.It is an open source and cross-platform programming language.

Why Learn Javascript ?

Javascript is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Field of  Web Development. Here you can see list of all key advantages of learning Javascript below:

  • Javascript is the most popular programming language in the world and that makes it a programmer’s great choice. Once you learnt Javascript, it helps you developing great front-end as well as back-end softwares using different Javascript based frameworks like jQuery, Node.JS etc.

  • Javscript is everywhere we can run it on any web browser, and to learn javascript you dont need any special softwares or any special environment.
  • Javascript helps you to  create really good and crazy fast websites. You can develop your website with a console like look and feel and give your users the best Graphical User Experience.
  • JavaScript usage has now extended to mobile app development, desktop app development, and game development. This opens many opportunities for you as Javascript Programmer.

  • Due to high demand, there is tons of job growth and high pay for those who know JavaScript. You can navigate over to different job sites to see what having JavaScript skills looks like in the job market.

What we can do in Javascript ?

Javascript has many features and it is a wide language, but below you can see some important features of javascript.

Javascript can Change HTML content

There are too many Functions / Methods in Javascript, getElementById() is from one of thoes functions.

By using getElementById() function we can change content of an HTML element by using value of its id attribute.

We can use .innerHTML with this function to change content of an HTML element using Javascript.

below is an example of changing content of an HTML element by using javascript.

<h2>What Can JavaScript Do?</h2>

<p id="demo">JavaScript can change HTML content.</p>

<button type="button" onclick='document.getElementById("demo").innerHTML = "Hello JavaScript!"'>Click Me!</button>

Here is output code of when we will run above code in our browser.

In Javascript we can use both Single and double quotes like shown below.

document.getElementById('demo').innerHTML = 'Hello JavaScript';
document.getElementById("demo").innerHTML = "Hello JavaScript";

Javascript can change HTML Attribute value

We can change HTML attribute value by using Javascript, below is an example in which we are changing value of src attribute of <img> at button click.

<h2>What Can JavaScript Do?</h2>

<p>JavaScript can change HTML attribute values.</p>

<p>In this case JavaScript changes the value of the src (source) attribute of an image.</p>

<button onclick="document.getElementById('myImage').src='pic_bulbon.png'">Turn on the light</button>

<img id="myImage" src="pic_bulboff.png" style="width:100px">

<button onclick="document.getElementById('myImage').src='pic_bulboff.png">Turn off the light</button>

Output :

Javascript can change HTML styles (CSS)

Here is an example in which you can see we are changing font size of paragraph by using Javascript.

<h2>What Can JavaScript Do?</h2>

<p id="demo">JavaScript can change the style of an HTML element.</p>

<button type="button" onclick="document.getElementById('demo').style.fontSize='35px'">Click Me!</button>

Output :

Javascript can hide HTML elements

We can hide HTML elements by changing value of display property of CSS to none using Javascript. Below you can see an example code of javascript.

document.getElementById("demo").style.display = "none";

Javascript can show HTML elements

We can show HTML elements by changing value of display property of CSS to block using Javascript. Blow you can see an example code of Javascript.

document.getElementById("demo").style.display = "block";



Next

Our Services

Below is the list of other services that we are providing to our valuable customers.

If you want to Grab any of our Service you can contact us on given contacts

  • Website Development
  • Software Development
  • Android Apps Development
  • Hosting + Domain
  • Search Engine Marketing (SEM)
  • Search Engine Optimization (SEO)
  • Social Media Marketing (SMM)
  • SMS Marketing
  • Email Marketing
  • Wordpress Development
  • PHP Open Cart Development
  • Digital Media Marketing
  • Digital Brand Promotion
  • Graphic Designing
  • Video Animation