Javascript and reason for its Origin
Earlier days in around 1993 Mosaic was the browser first most famous for its newspaper like content over the web, it got famous for its support for protocols such as File Transfer Protocol, Network News Transfer Protocol, and gopher.  NCSA ( National Center for Supercomputing Applications) released the browser in 1993, it was discontinued in 1997. Mosaic was the reason for the first internet boon.
Mosaic Browser
Netscape Navigator was later developed by Netscape, Now called as Mozilla, which employed many of the original Mosaic authors; however, it intentionally shared no code with Mosaic. Starting in 1995 Mosaic lost a lot of share to Netscape Navigator, and by 1997 only had a tiny fraction of users left, by which time the project was discontinued. Microsoft licensed the browser to create Internet Explorer in 1995.

Earlier web browsers would not display a page until all graphics on it had been loaded over the network connection; this often made a user stare at a blank page for as long as several minutes. With Netscape, people using dial-up connections could begin reading the text of a web page within seconds of entering a web address, even before the rest of the text and graphics had finished downloading. This made the web much more tolerable to the average user.

Netscape Communications collaborated with Sun Microsystems to include in Netscape Navigator Sun’s more static programming language Java, in order to compete with Microsoft for user adoption of Web technologies and platforms. Netscape Communications then decided that the scripting language they wanted to create would complement Java and should have a similar syntax, which excluded adopting other languages such as Perl, Python, TCL, or Scheme. To defend the idea of JavaScript against competing proposals, the company needed a prototype. Eich wrote one in 10 days, in May 1995.

The ECMAScript specification is a standardized specification of a scripting language developed by Brendan Eich of Netscape. Although it was developed under the name Mocha, the language was officially called LiveScript when it first shipped in beta releases of Netscape Navigator 2.0 in September 1995, but it was renamed JavaScript[11] when it was deployed in the Netscape Navigator 2.0 beta 3 in December.
Hence forth the ECMA standards of coding was implemented in Javascript, AS3 and JScript. Later on libraries like jQuery, Prototype, Dojo and Mootools were developed from Javascript. All web browser included Javascript as a Frontend Browser language. Thats the Beginning of Javascript.

The HTML DOM structure
DOM stands for “Document Object Model” in javascript we use the ‘document’ keyword to refer the documents root parent. Further calling any element within the document. Like p tag or div tag using a dot notation follwed by getElementByTagName command which we will learn further.

DOM Structure
DOM Structure

Javascript Syntax
Javascript is a case sensitive language, all its commands are in camel case format, Example

Camel Case is like writing number of words as a single word without gaps and writing the first letter of every word starting from second word in capitals.

Example:
It has three legs = itHasThreeLegs
Sugar candy is sweet = sugarCandyIsSweet

getElementById()
getElementByTagName()getElementByClassName()

More Commands
document.createElement(element);
document.removeChild(element);document.appendChild(element);
document.replaceChild(element);

We will learn more about the above commands in further classes.

Advertisements