0% found this document useful (0 votes)
15 views

Javascript Can Change HTML Content Javascript Can Change HTML Attribute Values Javascript Can Change HTML Styles (CSS)

JavaScript is the programming language of the web and was invented in 1995 by Brendan Eich. It can change HTML content and attributes, CSS styles, and display data in different ways such as writing to elements, document output, alerts, and the browser console. Variables store data values and primitive data types include simple values without properties or methods.

Uploaded by

Agam Sahu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Javascript Can Change HTML Content Javascript Can Change HTML Attribute Values Javascript Can Change HTML Styles (CSS)

JavaScript is the programming language of the web and was invented in 1995 by Brendan Eich. It can change HTML content and attributes, CSS styles, and display data in different ways such as writing to elements, document output, alerts, and the browser console. Variables store data values and primitive data types include simple values without properties or methods.

Uploaded by

Agam Sahu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

JavaScript is the programming language of HTML and the Web.

  1. HTML- the content of web pages

 2. CSS - the layout of web pages

3. JavaScript - behavior of web pages

JavaScript was invented by Brendan Eich in 1995,

Purpose:

JavaScript Can Change HTML Content


JavaScript Can Change HTML Attribute Values
JavaScript Can Change HTML Styles (CSS)

In HTML, JavaScript code must be inserted between <script> and </script> tags.

JavaScript can "display" data in different ways:

 Writing into an HTML element, using innerHTML.


 Writing into the HTML output using document.write().
 Writing into an alert box, using window.alert().
 Writing into the browser console, using console.log().

 document.write() method should only be used for testing.

For debugging purposes, you can use the console.log()

 variables are used to store data values.

A primitive data value is a single simple data value with no additional properties and methods.

The typeof operator returns "object" for objects, arrays, and null.

You might also like