Return to Kroll Design home page

JavaScript Tutorials

 
« Return

See also:
JavaScript is a programming language which is used in millions of web pages worldwide.
This page contains links to some useful JavaScript information and examples.
Examples of JavaScript in action coded by yours truly:
• Using Javascript and jQuery to display full-width images, overriding the container width.
• card matching game - Click on cards as you look for matching pairs.
• hide content based on date - each div has an expiration date. The div is displayed only if the expiration date is in the future.
• dynamic form - creates a form to invoke Google Trends
• PHP script used with JavaScript to count how often each letter a thru z occurs in the text that you type or paste into a text area.
Arrays (see also - Strings):
• arrays
• concat method - join multiple arrays into one array.
• "contains" - see if a string exist in an array. I don't find a method for this, so I wrote my own function.
• join method - merge array elements into one string.
• length property - contains the arrays's length.
• multidimensional named arrays
• multidimensional numbered arrays
• pop method - remove and return the last element.
• push method - add element to end of array.
• reverse method - reverse the order of all elements.
• shift method - remove and return the first array element.
• slice method - returns a portion of the array.
• sort method - sorts the array.
• splice method - remove or replace array elements.
• toString method - merge array elements into one string.
• unShift method - add element to start of array.
Date object:
• date and time methods
DOM (Document Object Model):
• DOM anchors and links arrays
• DOM history object
• DOM images array
• DOM lastModified property
• DOM referrer property
Flow of Control Statements:
• for loop
• if statement
• switch statement
Functions and Variables:
• Variable Scope: global, local, block
• local variables - variables that exist only within a function.
• setTimeout function - run javascript once, after specified delay.
• setInterval function - run javascript repeatedly.
Input/Output:
• prompt() method - request that the user input data.
• write() method
• writeln() method
Operators:
• equality operator ==
• exclusive or
• inequality operator !=
• logical operators
• math operators
• questionmark operator ?
• typeOf operator - determine what variable type a variable's value currently is -- number,string, etc.
Strings (see also - Arrays):
• charAt method - returns character at specified location.
• indexOf method - search for specified substring.
• length property - contains the string's length.
• lastIndexOf method - search for substring, work right to left.
• parseInt method - search for number within a string.
• remove blanks from strings - using charAt method in a loop.
• slice method - get a substring. DOES THIS RETURN RESULTS IN AN ARRAY? First arg is index position of where to start. Optional second argument is index position of where to stop. If the second parm is a negative number, it will start counting at the end of the string instead of the beginning. I NEED TO CREATE A PAGE FOR THIS METHOD.
• split method - convert the delimited string into an array.
• substr method - get a substring. I NEED TO CREATE A PAGE FOR THIS METHOD.
• substring method - copy (not cut) a substring from a string.
• toLowerCase() method - convert string to lower case.
• toUpperCase() method - convert string to upper case.
Windows:
• window.open for pop-ups and pop-unders
• window properties
Other topics:
• background image
• comments
• re-directing to another page
• splitting a script


 
« Return


©2012 Kroll Design    info@KrollDesign.net    781.910.3694
Last modified: 12/31/1969 7:00 PM