Category Archives: MyStudy


Selecting Elements By ID:  var section1 = document.getElementById(“section1”); Selecting Elements by Name:  var radiobuttons = document.getElementsByName(“favorite_color”); Selecting Elements by Type: var spans = document.getElementsByTagName(“span”);  

Posted in JavaScript, MyStudy | Leave a comment


Properties: location — current URL protocol host hostname port pathname search hash Browser Information: The Navigator object: properties – appName,appVersion,userAgent,platform Browser sniffing using navigator.userAgent // Define and browser.version for client sniffing, using code // derived from jQuery 1.4.1. Both … Continue reading

Posted in JavaScript, MyStudy | Leave a comment

JavaScript- JavaScript in Web Browsers – Chapter 4

Synchronous, Asynchronous, and Deferred Scripts: Defer: <script src=“demo_defer.js” defer></script> A script that will not run until after the page has loaded. Async: The script will be run async as soon as it is available.

Posted in JavaScript, MyStudy | Tagged | Leave a comment


A function is a block of Javascript code that is defined once and called many numbers of times. Defining Functions: function callMe(index){ var a=index; console.log(a); } callMe(5);//Invoking functions //Object Literals var o{ var a; add:function(){ this.c=this.a+2; } }; o.add(); –Chapter … Continue reading

Posted in MyStudy | Leave a comment


An Array is a collection of values. Each value are accessed by index value. Creating Arrays: var empty = []; // An array with no elements var primes = [2, 3, 5, 7, 11]; // An array with 5 numeric elements … Continue reading

Posted in MyStudy | Leave a comment

JavaScript – Object – Chapter 1

Object Literals: var x={}; var point={x=0,y=0}; Creating Objects with new: var js-new Object(); Prototype: Every Javascript object has a second javascript object associated with it. The second object is known as prototype. Object.prototype Object.create(): That creates a new object. var … Continue reading

Posted in MyStudy | Leave a comment