MCR Web Solutions
Home HTML CSS JavaScript PHP MySQL AJAX Model Questions Resources

JavaScript

JavaScript is a client-side programming language that runs in the client's browser. Unlike, HTML and CSS, one can write programming constructs in JavaScript like loops, conditional statements, functions etc.


UNIT III CONTENTS

JavaScript Introduction, Variables, Operators, Functions, Control Structures, Events, Objects.


UNIT IV CONTENTS

Advanced JavaScript, DHTML DOM and Forms.



As my laptop got crashed recently, I could not prepare notes for the remaining JavaScript. Instead, the complete notes on Javascript has been provided here - (Download - Source: Mr. R.Srinivasa Raju, HOD, CSE, VIT). Alternately, students can go through the Javascript tutorial on w3schools.com (www.w3schools.com/js/default.asp). The notes for the remaining chapters of this course will be added as usual).


JavaScript Introduction

  • JavaScript is a web-based, client-side programming language that runs in the browser.
  • It is used to make interactive webpages that can add life to boring static HTML webpages.
  • JavaScript is used mainly to add functionality to the webpages, validate forms, invoke actions based on user's events etc.
  • It is the most popular scripting language on internet and works in all major browsers.
  • JavaScript can be used to do the following:
    • We can write programs or small snippets of code (scripts) that can execute on the webpage.
    • JavaScript can react to events such as mouse click, page load, mouse over etc.
    • We can manipulate (read/change) the content of HTML elements dynamically.
    • JavaScript can be used to validate the form data for correctness (Ex. Email Validation, Username validation etc.).
    • JavaScript can detect the visitor's browser.
    • Cookies can be created using JavaScript that can store and retrieve information on the client's computer.
  • It is the most popular scripting language on internet and works in all major browsers.
  • JavaScript is a free, light-weight programming language that can be embedded directly into HTML code.
  • JavaScript is a interpreted language. That means the these scripts execute with out compilation.
  • Java and JavaScript are NOT the same. They are 2 different programming languages meant for 2 different purposes.
  • JavaScript is invented in 1996 by Netscape.
  • The basic syntax of a JavaScript code is as follows:
    <script type='text/javascript'>

    // Javascript Code goes here.......

    </script>
  • JavaScript code can be put in the <BODY> or the <HEAD> sections of a HTML page.
  • You can place as many scripts as you want in both the <HEAD> and the <BODY> even at the same time.
  • You can use an external JavaScript like an external CSS file by creating a separate .js file and linking it (not with the link tag as in CSS). The syntax is as follows:
    <script type='text/javascript' src='myscript.js' > </script>
  • JavaScript is CASE-SENSITIVE unlike HTML.
  • Comments in JavaScript can be placed using '//' or using '/*' & '*/' set as follows:
    <script type='text/javascript'>

    //Single Line Comment

    /* This
    is a
    Multi-line Comment */

    </script>

Top


JavaScript Variables

  • JavaScript is a web-based, client-side programming language that runs in the browser.
  • It is used to make interactive webpages that can add life to boring static HTML webpages.
  • JavaScript is used mainly to add functionality to the webpages, validate forms, invoke actions based on user's events etc.
  • It is the most popular scripting language on internet and works in all major browsers.
  • JavaScript can be used to do the following:
    • We can write programs or small snippets of code (scripts) that can execute on the webpage.
    • JavaScript can react to events such as mouse click, page load, mouse over etc.
    • We can manipulate (read/change) the content of HTML elements dynamically.
    • JavaScript can be used to validate the form data for correctness (Ex. Email Validation, Username validation etc.).
    • JavaScript can detect the visitor's browser.
    • Cookies can be created using JavaScript that can store and retrieve information on the client's computer.
  • It is the most popular scripting language on internet and works in all major browsers.
  • JavaScript is a free, light-weight programming language that can be embedded directly into HTML code.
  • JavaScript is a interpreted language. That means the these scripts execute with out compilation.
  • Java and JavaScript are NOT the same. They are 2 different programming languages meant for 2 different purposes.
  • JavaScript is invented in 1996 by Netscape.
  • The basic syntax of a JavaScript code is as follows:
    <script type='text/javascript'>

    // Javascript Code goes here.......

    </script>
  • JavaScript code can be put in the <BODY> or the <HEAD> sections of a HTML page.
  • You can place as many scripts as you want in both the <HEAD> and the <BODY> even at the same time.
  • You can use an external JavaScript like an external CSS file by creating a separate .js file and linking it (not with the link tag as in CSS). The syntax is as follows:
    <script type='text/javascript' src='myscript.js' > </script>
  • JavaScript is CASE-SENSITIVE unlike HTML.
  • Comments in JavaScript can be placed using '//' or using '/*' & '*/' set as follows:
    <script type='text/javascript'>

    //Single Line Comment

    /* This
    is a
    Multi-line Comment */

    </script>

Top


© MCR Web Solutions, Bhimavaram.