Javascript Archives

Drag and Drop Using Javascript

This is a sample program to create a drag and drop using javascript.

Image Slide Show

This is the source code to create an image slide show in javascript:
Read the rest of this entry

Image Viewer using javascript

This is an Image Viewer application using HTML and Javascript.

Read the rest of this entry

Simple Form validation with Javascript

This is a very simple validation using Javascript.
Here we have three fields: Name, Phone and Email.
Number validation is applied in phone field and email validation is applied in email field.
Also you cannot leave your fields blank.
Read the rest of this entry

Android and iphone detection using javascript

Applications that run on an Android have a distinctly different look than iPhone applications.
In the code snippet below, you can use JavaScript to determine the type of device and then use the appropriate style-sheet.

Incoming search terms:

  • javascript detekce android

JavaScript iPad detection

If you’re trying to detect the iPad using JavaScript, there’s a very simple way to do so: check navigator.platform.
The value of navigator.platform is always “iPad” when Safari for iPad is the user-agent.
This is the most accurate way to detect the iPad from JavaScript, assuming you don’t want to do a full user-agent string sniff.
A sample function is given below:

Keep in mind that navigator.platform doesn’t change even when the user-agent string for a browser is changed.

Rotating Image Using Javascript

The below code allows you to rotate the image according to the angle you given.
Read the rest of this entry

Incoming search terms:

  • javascript code for rotating images

Simple graphics using javascript

Note: Update your browser to a latest version to make the code work.

your browser does not support the canvas tag


Mathematics Game

This is a javascript game to test your ability in simple mathematics. The questions are categorized into three as Easy, Moderate and Difficult. First you have to select a category. Along with it, you have to choose whether you are playing on addition, subtraction, multiplication or division. Then a prompt box will appear with a question. After entering your answer click on OK button. Then a dialogue box appears with score and number of right and wrong answers. There is a built in score checker. On game completion, you can check your score and reset it if you wish so.

Read the rest of this entry

Simple Calculator Using Javascript

The script below explains a simple mathematical calculator.
Read the rest of this entry

Incoming search terms:

  • basic calculator using javascript function
  • simple calculator using javascript
Page 7 of 8« First...45678