Dear All,
I am designing simple HTML page.
My requirement is when the page loads it should display alert message box with two buttons ie.OK
If i click OK buttons then the page will display.
How can i do this and i need to manipulate alertbox properties like
backgroundcolor
fontstyle
fontsize
height
width etc...
Thanks in Advance
How to show alertbox in HTML page when it loads
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


SenthilkumarRank #387 · 6.5K reputationPosted Mar 5, 2012, 12:50 AM EST
window.onload = function()
{
}
To get the confirmation, you have to use the confirm dialog to take decisions.
window.onload = function()
{
if(confirm("Do you want to continue?"))
{
}
else
{
window.close();
}
}