JavaScript

JavaScript Source Code

Free JavaScript Source Code. Download 10 latest JavaScript with source code for free here.

Change Stylesheet in Javascript

Submitted by GeePee on
This project will teach you how to change the web page stylesheet using javascript. I have here in my example the 3 different buttons. On click of the button, the sizes or the web page style will automatically change according to the style you set up. I have 3 different styles(small, medium, large), so I have also to create 3 stylesheet named small.css, medium.css and large.css. It is easy and it

Date Object in Javascript

Submitted by GeePee on
In this project, you will learn about date objects in javascript. The Date object is used to work with date and time. And this is the default functional key. var date = new Date(); The following are the Date Objects method. We will work only with the date. var month = date.getMonth(); Returns the month from 0 to 11. var day = date.getDate(); It will return the day of the month. var year = date

Arrays and Timed Loops in Javascript

Submitted by GeePee on
This project will teach you how to program arrays and timed loops in javascript. In the last project, we used timed loops in changing image, but this time we will use it in text animation. We use split method and uses empty string as the separator(the string will split between each character). The animation then looks like you're typing a text. Hope you learn from this project.

Using a Timer in Javascript

Submitted by GeePee on
In my previous project Changing Image Source, we change images by clicking. But what if we want to change them automatically and continuously? We have to use a timer on it. With just few lines of codes added in our previous project, we can make it work. var timer = setInterval('changeImg()', 3000); We will use setInterval method. Inside of it is the 2 arguments. First is the code that you want to

Changing Image Source in Javascript

Submitted by GeePee on
This project will teach how to change image source using basic javascript code. onClick event, image will automatically change. Here's the full code. var img_tracker = 'chrome'; function changeImg(){ var image = document.getElementById('browser'); if(img_tracker == 'chrome'){ image.src = 'images/firefox.jpg'; img_tracker = 'firefox'; }else{ image.src = 'images/chrome.jpg'; img_tracker = 'chrome';

Expand/Retract Box Animation in Javascript

Submitted by GeePee on
This project will teach you how to animate expand and retract box using javascript. You can also do this in jQuery plugin by using toggle slide. But here in my example I used raw javascript code. This is simple and easy to do with just a few lines of code. It expands the box according to it's content height. Hope you learn from this project.

How To Feed Mysql Data Into Google Map

Submitted by thusitcp on
Modem day client server applications support lot of mobile device platform so real time GPS data will be collect most of the applications. Projection of collected data visualized on GIS applications has big trend these types of applications. In this tutorial I am going to teach you how to visualize data on google map using mysql databases. For a tutorial I am going to create online event

How to Handle Mouse Even in Javascript Part 1

Submitted by thusitcp on
Most common way users interact with the computer is by using pointing device called mouse. This wonderful device help graters amount of improvement usability of computer applications. Today’s all the computer language support mouse events. In this article I am going to explain how to handle mouse event using JavaScript. When we consider JavaScript event there are number of mouse event but here I