Html alert box questions?

I get very obsessed with things. Today right now, it's alert boxes. So, here are my questions about them.
Let's say you have
<html>
<head><title>Example</title></head>
<body onLoad="alert('Welcome to my website. For further instruction, click ok.')">
</body></html>
If you pressed ok, how would you get it to show another alert? Just wondering? Also, how would you make an alert box that does this?
<body onUnload="alert('There's no escape')">
And if you press ok, it automatically reopens your website? I've looked everywhere and I can't seem to find the answer I'm looking for. Just one more question, I hate just seeing the ok and ocasionally cansil, are there other ones, like continue, accept, reject, that kind of thing? The best answer goes to whoever answers first, and whoever's answers work. Thank you for all your help.
First of all, my website is either offline, or something noone will even know about, and secondly, I kind of like those alert boxes, I used to be scared of those ones telling me I had a virus, but now that I know what they really are, I just laugh at them.
Oh, I didn't even get the email for the second answer, I noticed it after I added the details, sorry.
Oh, it's javascript, no wonder IE blocks the script when I run my site offline. That's good to know...
 
sample javascript alerts

function say_hi(){
var h_i = alert("Did you click ok?");
if(h_i){
alert("You said hi because you had to click ok!");
}
else{
alert("You did not tell me hi...boooooooo");
}
}

JavaScript prompt(), confirm(), alert() functions

//Prompt


Code:
var say_yes = prompt("::ATTENTION::\nThis is a prompt! To separate lines use the \n\n\nSee\n\n\n3\n\n\nand type yes or no === string");
if(say_yes != "yes"){
alert("::ATTENTION::\nYou didn't say yes");
}
else{
alert("Great, you agreed");
}




//Confirm


Code:
var say_yes = confirm("Will you say yes? === true");
if(say_yes){
alert("Cool! you said yes again === true");
}
else{
alert("You selected no === false");
}




//Alert


Code:
alert("::ATTENTION::\nThis is an alert! To separate lines use the \n\n\nSee\n\n\n3");
 
Back
Top