Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

JavaScript guide to website construction

May 27, 2021 Website construction guide

Table of contents

JavaScript guide

JavaScript - Client script

JavaScript is the scripting language that belongs to the network!

JavaScript is used by millions of Web pages to improve design, validate forms, detect browsers, create cookies, and more.

JavaScript learning is simple

JavaScript instance

My First Web Page

This is a paragraph.

Try it out . . .
Click the "Try it" button to view the online instance.

What is JavaScript?

  • JavaScript is designed to add interactive behavior to HTML pages.
  • JavaScript is a scripting language (script language is a lightweight programming language).
  • JavaScript consists of several lines of executable computer code.
  • JavaScript is usually embedded directly into HTML pages.
  • JavaScript is an interpretative language (that is, code execution is not precompiled).
  • JavaScript is available to all people without a license.

The client script

JavaScript "develops" browser behavior. This is called a client script (or browser script).

Server-side scripting is the act of "making" the server (see the ASP/PHP tutorial on this site).

What can JavaScript do?

  • JavaScript provides HTML designers with a programming tool
    HTML creators are often not programmers, but JavaScript is a scripting language with only extremely simple syntax! Almost everyone has the ability to put short pieces of code into their HTML pages.
  • JavaScript puts dynamic text into HTML pages
    A JavaScript declaration like this puts a variable piece of text into an HTML page: document.write (""""
  • JavaScript can respond to events
    JavaScript can be set to be executed when an event occurs, such as when page load is complete or when a user clicks on an HTML element.
  • JavaScript can read and write HTML elements
    JavaScript can read and change the content of HTML elements.
  • JavaScript can be used to validate data
    JavaScript can be used to validate data before it is submitted to the server.
  • JavaScript can be used to detect visitors' browsers
    JavaScript can be used to detect a visitor's browser and load the appropriate page for that browser based on the detected browser.
  • JavaScript can be used to create cookies
    JavaScript can be used to store and recover information that is located on the visitor's computer.

What is HTML DOM?

HTML DOM defines the standard way to access and manipulate HTML documents.

The DOM expresses HTML documents as tree structures.

HTML DOM Tree instance

JavaScript guide to website construction

How do I learn JavaScript?

Visit the full JavaScript tutorial

Visit the full HTML DOM tutorial

Visit the full JavaScript and HTML DOM reference manual