Latest posts

10/recent/ticker-posts

Message Printing In HTML JavaScript || How to Print Message by Using JavaScript || Program to Print the Message in JavaScript

Message Printing In HTML JavaScript


Friend we going to start our JavaScript Programming.
This is the 1'st Post of our JavaScript

Whta is Java Script ? 

JavaScript is a scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else.

So, Firstly we need to know that, who invented  the JavaScript Programming Language ? 

According to w3Schools.com,
JavaScript was invented by Brendan Eich in 1995. It was developed for Netscape 2, and became the ECMA-262 standard in 1997.
After Netscape handed JavaScript over to ECMA, the Mozilla foundation continued to develop JavaScript for the Firefox browser. Mozilla's latest version was 1.8.5. (Identical to ES5).



In this session we are going to start our JavaScript Programming,
So in that firstly we are going to know that, hoow to print an Message on Output Screen By using JavaScript.

We know that in HTML, we are directly able to Write anything in Body tag to print it on Output Screen.
For the basic formating, we use paragraph tag, heading tag's (h1, h2, h3, h4, h5, h6)

For Example,








Here, we used basic HTML to dsisplay the text on Output Screen.

Now in JavaScript, we need to create a Script in HTML Document.
The Script may be written in Between Head tag or direcly in Body Tag.

In that script, we are able to write any message or text by using methods,

Methods to print the text on JavaScript Output Screen,

1)  console.log(Text in double Quotes);
2) document.write(Text in double Quotes);

There is an another function called, 'alert( )' used to print the text in a Prompt Box.

Sysntx : 
        alert(Text in double Quotes);

For Example,








To break the sentence and move the next sentence on next line, we need to use the BR Tag with these sentence in function.

Example,








That's all for this session !



In this session, we learned :

1) What is JavaScript
2) Who invented JavaScript
3) How to Display an message in HTML output
4) How and where to Use JavaScript
5) How to Display Messages By Using JavaScript in Output
6) Methods/Function of JavaScript to print the message
7) Where to use BR Tag in JavaScript



I hope, this session will help you to learn basics of JavaScript !

Thanks for Watching, Visit again to learn the HTML JavaScript !


Learn Python <- Click Here






Also Visit


Post a Comment

0 Comments