Droid
Would you like to react to this message? Create an account in a few clicks or log in to continue.

WHAT JAVASCRIPT IS ALL ABOUT

Go down

WHAT JAVASCRIPT IS ALL ABOUT Empty WHAT JAVASCRIPT IS ALL ABOUT

Post by Admin Tue Jul 28, 2015 5:52 pm

JavaScript is the most popular programming language in the world.
This page contains some examples of what JavaScript can do.


JavaScript Can Change HTML Content

One of many HTML methodsĀ 

isdocument.getElementById().
This example "finds" the HTML element with id="demo", and changes its content (innerHTML):

Example


Code:
document.getElementById("demo").innerHTML = "Hello JavaScript";







JavaScript Can Change HTML Attributes

This example changes an HTML image, by changing the src attribute of an <img> tag:



JavaScript Can Change HTML Styles (CSS)

Changing the style of an HTML element, is a variant of changing an HTML attribute:

Example



Code:
document.getElementById("demo").style.fontSize = "25px";






JavaScript Can Validate Data

JavaScript is often used to validate input


Did You Know?

[th]WHAT JAVASCRIPT IS ALL ABOUT Lamp[/th]
JavaScript and Java are completely different languages, both in concept and design.

JavaScript was invented by Brendan Eich in 1995, and became an ECMA standard in 1997.

ECMA-262 is the official name. ECMAScript 5 (JavaScript 1.8.5 - July 2010) is the latest standard.
Admin
Admin
Admin
Admin

Posts : 83
Points : 32267
Reputation : 3
Join date : 2015-07-22

https://droid.1talk.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum