html checkbox form

Checkboxes

Checkboxes are used when you want the user to select one or more options of a limited number of choices.


How it looks in a browser:

I have a bike:
I have a car:
I have an airplane:

Read More..

html radio form

Radio Buttons

Radio Buttons are used when you want the user to select one of a limited number of choices.


How it looks in a browser:

Male
Female
Note that only one option can be chosen.

Read More..

html input form

Input

The most used form tag is the tag. The type of input is specified with the type attribute. The most commonly used input types are explained below.

Text Fields

Text fields(type) are used when you want the user to type letters, numbers, etc. in a form.

example:

result:
First name:

Last name:

Read More..

never ending loop

JavaScript for Loops


The for loop is used when you know in advance how many times the script should run.

Syntax

for (var=startvalue;var<=endvalue;var=var+increment)
{
code to be executed
}

Example


var i=0;
for (i=0;i<=5;i++)
{
document.write("The number is " + i);
document.write("
");

}
 

The example below defines a loop that starts with i=0. The loop will continue to run as long as i is less than, or equal to 5. i will increase by 1 each time the loop runs.
Note: The increment parameter could also be negative, and the <= could be any comparing statement.

Example

If you want a never ending loops, you just decrease your variable.

var i=0;
for (i=0;i<=5;i--)
{
document.write("The number is " + i);
document.write(" ");
}
 

Read More..
 

Mhabibie's web | Mhabibie's BLog