Home | Contact Us | Log In | Help
HOME NEW LISTING MOST POPULAR HIGHEST RATED SCRIPTS ADD SCRIPT DOWNLOADS FORUM
Tutorials
  ASP.Net & C#
  ASP
  Perl and PHP
  Java Scripts
  C and C++
  Ajax Tutorials
  J2ee, J2Me, Java
  Python & Ruby Rail
  Crystal Report
  Sap
  CGI
  XML
  Cold Fusion & CFML
  HTML, DHTML & CSS
  Dreamweaver
  FLASH
  Photoshop/Web Designing
  Tools & Utilities
  Oracle/D2K
  Sql Server
  MySql
  Domain Name Registration
  Remotely Hosting
  Web/Server Application
  Hotel Marketing
  Internet and Law
   Search Engine Optimization/SEO
E-Commerce
Interview Questions
previous< 8 9 10 11 12 13 14 15 16 > Next
JAVA SCRIPT 12
Fun with random numbers

In this tutorial we show how to generate random numbers using JavaScript, and include some useful and entertaining tricks that you can do with random numbers.

We can use JavaScript to generate random numbers, that is, numbers that are different each time the script is run. This allows us to do all sorts of fun stuff, such as:

The index number of an array

Arrays really come in to their own when you access their index numbers. You can use a variable in place of the index number. Then, if you increment the variable, you can access the elements in your array. As an example, try this script in a web page. For the web page, create a form called frmOne. Put a button on the form, and a text box called txtSeason. If you prefer, copy and paste this one:

JavaScript: Simple 'Chalk' Board

Drawing Board: Using a table and different event handlers to change the background of the Cells of the table. It is really Simple Code

<'td "OnDblClick="bgColor='BLACK'" OnMouseDown="bgColor='#FFFFFF'" bgcolor="BLACK" >   <'/td> You can add more rows and columns to make it anysize you want. If you want to add to it, you could allow the user to select what colors or how many rows and columns. It's prety basic.
The Math Object

The Math object of JavaScript allows you to perform certain calculations by using method functions of the Math object. Also, it provides a few constants such as pi. The easiest way to get a value is to define a variable and set its value to a property or function of the Math Object.

If you want to use a property, which returns a constant value (such as pi), you would write something like this:

var my_car=Math.property;

You would replace the word "property" with the property you want to use. So, if you want to use the value of pi in a variable, you would use the PI property of the Math object. You would write:

Introductory Guide to regular expressions

Validating user input is the bane of every software developer’s existence. When you are developing cross-browser web applications (IE4+ and NS4+) this task becomes even less enjoyable due to the lack of useful intrinsic validation functions in JavaScript. Fortunately, JavaScript 1.2+ has incorporated regular expressions. In this article I will present a brief tutorial on the basics of regular expressions and then give some examples of how they can be used to simplify data validation.

previous< 8 9 10 11 12 13 14 15 16 > Next
  Copyright 2000-2006 © SoloScript.com, All rights reserved.