Skip to main content

JavaScript Source Code

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

Progress Meter Using CSS and Javascript

In this tutorial, I am going to teach you on to make a beautiful progress meter using CSS and Javascript. Just download the source code below and follow the instructions. Instructions Creating our index.php page In this page we will be creating our html code. don't forget to place the css link on the head tag of the page and place the javascript link below the body tag. Progress Meter Task 1 Task

Creating a Rotating Shape Using Javascript

In this chapter, I am going to teach you how to make a rotating image or shape using javascript. Download the source code and follow the directions below. You can use this to your simple projects. DIRECTIONS HTML CODE canvas { border:1px solid #d3d3d3; background-color: #f1f1f1; } var myGamePiece; function startGame() { myGamePiece = new component(30, 30, "red", 80, 75); myGameArea.start(); } var

Game using HTML and Javscript

In this tutorial, I am going to teach you how to create a simple html5 game using javascript. Just follow the instructions below and download the source code. INSTRUCTIONS Creating our index.php canvas { border:1px solid #d3d3d3; background-color: #f1f1f1; } UP LEFT RIGHT DOWN Creating our javascript code and name it as script.php var myGamePiece; var myObstacles = []; var mySound; function

Time of the Day Greeting Message in Javascript

In this tutorial we are going to learn how to display a greetings message according to the time of the day. Here's the little javascript code that will display the messages. Copy the code and paste it to your body section. You change the messages below to what you want. var Digital=new Date() var hours=Digital.getHours() if (hours>=5&&hours=13&&hours=18&&hours=21&&hours

Digital Clock Using Jquery

In this tutorial I am going to teach how on to create a digital clock that you can use in your systems or project. Just download the source code below for basis. and follow the instructions. DIRECTIONS INCLUDE THIS LINK IN YOUR HEAD TAG CSS CODE body{ background:#f5f5f5; font:bold 12px Arial, Helvetica, sans-serif; margin:0; padding:0; min-width:960px; color:#000; } a { text-decoration:none; color

Simple Tic Tac Toe Game in Javascript

In this project we are going to learn how to create tic-tac-toe game in javascript. This will entertain you and your visitors from your website. Here's the complete javascript code for this game. Have Fun! TIC TAC TOE GAME if (document.all||document.getElementById){ document.write('.tictac{') document.write('width:50px;height:50px;') document.write('}') } var sqr1 var sqr2 var sqr3 var sqr4 var

Disable Copy and Paste using Javascript

In this project we are going to learn how to disable copy and paste. You can't prevent stealing your content but you can make it more difficult for people to copy the contents of your website. Here's a script that will disable Copy and Paste. //disable mouse drag select start document.onselectstart = new Function('return false'); function dMDown(e) { return false; } function dOClick() { return

Characters Restriction using javascript

In this project we are going to learn on how to disable characters in input field using javascript. The only allowed characters in this project are "01234567890.". If you want to enable or change some characters find this code // var validList = "0123456789."; for character restriction. Input Characters Restriction input{padding:5px; border:1px solid #888;} // Retrieve last key pressed. Works in

Drag and Drop using Javascript

In this tutorial, we are going to learn how to the image into the box using javascript. This is a simple project that you can use in your website or system. DIRECTIONS HTML CODE Drag Image into the squares using HTML5 JAVASCRIPT CODE function allowDrop(ev) { ev.preventDefault(); } function drag(ev) { ev.dataTransfer.setData("text",; } function drop(ev) { ev.preventDefault(); var data