JavaScript Tutorials

JavaScript Tutorials, AJAX Tutorials, JScript Tutorials, JS Tutorials, JQuery Tutorials, etc.

Hello World in JavaScript

Objective:

  • How to write Hello World in JavaScript?
  • How to write Hello World in JS?
  • How to print Hello World in JavaScript?
  • How to print Hello World in JS?

Source Code :

Here is the sample code for you:

[sourcecode lang=”javascript”]

<html>
<body>
<script language = “javascript” type = “text/javascript”>

document.write(“Hello World!”)

</script>
</body>
</html>

[/sourcecode]

Git Hub:

You can also download this code from link given here : Hello World in JS

How to change editor full screen in NetBeans IDE?

Objectives :

  • How to change editor full screen in NetBeans IDE?

NetBeans IDE is having a new and great feature where we can full screen the code editor window.

This small video tutorial shows how to change editor full screen in NetBeans IDE?

[youtube=”https://www.youtube.com/watch?v=w49znamwczw&feature=youtu.be”]

Being a trainer, I need to share screen with code and sometime only code nothing else. This is one of the most useful feature for me while teaching Java technologies and UI technologies such as HTML5, CSS, JS, etc. This is why I love NetBeans IDE a lot.

Hope this tutorial is helpful for you as well.

Hello World in different languages

Free Source Code

Free Source Code

Objectives :
* How to write Hello World in Java?
* How to write Hello World in C?
* How to write Hello World in PHP?
* How to write Hello World in C++?
* How to write Hello World in JavaScript?
* How to write Hello World in HTML?
* How to write Hello World in CSS?
* How to write Hello World in COBOL?

Java

[sourcecode language=”java”]
class HelloWorld
{
public static void main(String args[])
{
System.out.println(“Hello World!”);
}
}
[/sourcecode]

C

[sourcecode language=”c”]
#include
#include
void main()
{
clrscr();
printf(“Hello World!”);
getch();
}
[/sourcecode]

C++

[sourcecode language=”cpp”]
#include
#include
void main()
{
clrscr();
cout<getch();
}
[/sourcecode]

CSS

[sourcecode language=”css”]
body:before
{
content: “Hello World”;
}
[/sourcecode]

COBOL

[sourcecode language=”text”]
****************************
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
MAIN SECTION.
DISPLAY “Hello World!”
STOP RUN
****************************
[/sourcecode]

HTML

[sourcecode language=”html”]
<html>
<head>
<title>Hello World Example</title>
</head>
<body>
Hello World!
</body>
</html>
[/sourcecode]

JavaScript

[sourcecode language=”javascript”]
document.write("Hello World");
[/sourcecode]

PHP

[sourcecode language=”php”]
<!–?php echo ‘Hello World!’ ?–>
[/sourcecode]

Linux Shell Script

[sourcecode language=”text”]
echo "Hello World !"
[/sourcecode]

Enjoy coding!

Posted from WordPress for Android

Execute multiple functions on single HTML event

Objectives :-

* How to execute multiple functions on single HTML event?
* How to call multiple funtions on single HTML event?

Many time you may have faced this issue, you may need to call / execute multiple functions on single HTML event & you may have stucked there, stop working, changed the functionality, etc.

But now don’t worry about it anymore. Here is the Code to execute multiple functions on a single HTML event :-

[sourcecode language=”html”]
<html>
<head>
<script type="text/javascript">
function Message1 ()
{
alert ("Message1");
}
function Message2 ()
{
alert ("Message2");
}
</script>
</head>
<body>
<form name="NameTheForm">
<input type="Button" name="buttonName" onclick="Message1(); Message2()">
</form>
</body>
</html>
[/sourcecode]

The above code will execute / call two functions on single HTML event. Here for example I have written two functions but you can write multiple functions & can call them to onclick event separated by semicolon (;) as shown above.

Posted from WordPress for Android