Posts

Forms and Form Events

JavaScript allows  you to make your HTML pages more interactive and smarter by providing a decision making capabilities. JavaScript is used to enhance your forms.  The CGI (Common Gateway Interface) is a way to safely transfer data from client to server. It is used to transfer users data from browser to requested server. JavaScript is used to process forms without requesting a server. When user wants to submit data to server, user needs to submit form to CGI program. Before submitting form to server JavaScript takes all precautions such as read and set contents, form controls, form events, validation of data, invoking of an objects etc... Form A simple HTML form is way different than a JavaScript enhanced form. The JavaScript form is always relies on one or more events and event handlers. These event handlers calls JavaScript actions when user interact with the form for example moving a mouse over form or any component, clicking on any button etc.  Form Controls Foll...

Arrays, Function and String in JavaScript

  Arrays Array is an ordered collection of the elements which stores the data. Syntax: There are 2 syntaxes for creating an empty array:                 let   arr = [];                 let arr = new Array();  Ex Mostly the first syntax is used to create an array,  We can initialize values as follows: let   fruits = [“Pineapple”, ”Mango”, ”Watermelon”]; Array elements are ordered and starts with index 0 (zero) We can access array elements by its numbers                 let   fruits = [“Pineapple”, ”Mango”, ”Watermelon”];                 document.write(fruits[0]);             ...

Introduction to JavaScript

  Introduction JavaScript is a lightweight language It is interpreted programming language It is designed for creating network-centric applications It is complimentary and integrated with Java It is very easy to implement because it is integrated with HTML It is open and crossed platform Features of JavaScript It is most popular scripting and programming language JavaScript is everywhere, it comes on every modern web-browser It does not need any special environment setup It helps to create beautiful and interactive websites It has lots of frameworks and libraries Advantages of JavaScript Less Server interaction Validate user inputs at Client Side, no load on server Immediate feedback to the visitors Increased connectivity Create interfaces to react when user hovers mouse over components Richer interface Includes items as drag & drop components and sliders to give a Rich Interface to websites Program in JavaScript Following program will print "Hello World!!!" on browser us...