Tuesday, January 5, 2010

How to give Alert/Messsge box in JavaScript?

alert('your message to be popped up');

Example:
< input type="button" value="Example" onclick="alert('your message to be popped up');return true" />

If you open this code with the Browser then you can see a button named with "Example".
If you click on it it will popup a message box with the message 'your message to be popped up'.

No comments: