Javascript popup boxes

1.Displaying an alert box:
An alert box can be displayed using Javascript's alert() function.

Syntax:
alert("Text to display in the alert box");
2.Displaying a confirmation box:

A confirmation box is used to take choice of user,A confirmation box will appear will with an "OK" button and a "Cancel" button.

Syntax:
confirm("Text to display in the confirmation box");


3.Displaying a prompt box:
A prompt box is used to get data from the user.

Syntax:
prompt("Text to display in the prompt box, "Default value");

Event Handlers:

1.onClick: onClick handlers execute something only when users click on buttons,div's etc.

2.onLoad :The onload event handler is used to call the execution of JavaScript after loading.
3.onMouseover,onMouseout : These handlers are used exclusively with links.

How to change the HTML Style using java script?
document.getElementById(id).style.property=new style

Search This Blog

All the rights are reserved to this blog is belongs to me only.. Powered by Blogger.