HarJuky avatar

Learn Basic Javascript Programming

harjuky

Published: 24 Apr 2018 › Updated: 24 Apr 2018Learn Basic Javascript Programming

Learn Basic Javascript Programming

image


Brief description of javascript
Javascript is a scripting language embedded in HTML code and processed on the client side.
With this language, the ability of HTML documents to be more widespread. As the example, using JavaScript is possible to validate inputs on the form before the form is sent to the server.
Javascript is not a Java language and is a different language. Javascript interpreted by the client (the code can be seen on the client side), while the Java code compiled by the programmer and the result of the compilation being run by the client.

JavaScript structure
The structure of JavaScript is as follows:

< SCRIPT LANGUAGE = "JavaScript" >

Information : Code

generally included with the aim that if the browser does not recognize JavaScript then the browser will treat it as a comment so is not displayed in the browser window.

JavaScript as an object-oriented language Property
Property is an attribute of an object. For example, car objects have car color properties.

Writing:
Name_object.property = value
window.defaultStatus = "Happy Learning JavaScript";

Method
The method is a collection of code used to do something action
against the object.

Writing:
Name_objek.name_method (parameter)
document.write ("Hallo")

The location of JavaScript in HTML
Javascript script in HTML document can be placed on:

  1. Head Section
  2. Body Parts (rarely used).

Here's a simple example of using javascript alerts in HTML pages, to make it please open a text editor like notepad then write the following code and save it with the name basic1.html
< HTML>
< HEAD>
< TITLE> Alert Box < /TITLE>
</ HEAD>
< BODY>
< SCRIPT LANGUAGE = "JavaScript">

after that run using the browser you use.
just so much of our learning today :)

Leave Learn Basic Javascript Programming to:

Written by

Musician, DJ, Blogger & Wap Developers

Read more #programming posts


Best Posts From HarJuky

We have not curated any of harjuky's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From HarJuky