Duminică, 2024-05-19, 2:05 AM
Bine ati venit, Vizitator
Principala » Articole » Scripturi Ucoz

Script restrictionare minori
Code:

<!-- TWO STEPS TO INSTALL AGE REDIRECTION:

   1.  Paste the coding into the HEAD of your HTML document
   2.  Copy the onLoad event handler into the BODY tag  -->

<!-- STEP ONE: Copy this code into the HEAD of your HTML document  -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<! >
<! >

<!-- Begin
function getName() {
var name1 = prompt("What is your name?", "")
var age = prompt("How old are you?", "")
var email1 = prompt("What's your e-mail address?", "")
if( age <= 12) {
alert("Hey kid...  You're only " + age + " and expect to stay here!!  No way!  " + name1 + ", get out of here!  If you are at " + email1 + " , then I have your e-mail too!!")
window.open("http://www.crayola.com")
} else {
alert("Hello " + name1 + "!  Welcome to JavaScript Source Code 3000!  Since you are " + age + ", you are allowed to stay!!  If your e-mail is " + email1 + ", you can expect some e-mail soon....")
   }
}
// End -->
</SCRIPT>


<!-- STEP TWO: Add this onLoad event handler into the BODY tag  -->

<BODY onLoad="getName()">

 

<!-- Script Size:  0.56 KB  -->


Categorie: Scripturi Ucoz | Adaugat de: aLeX-Adm (2010-03-24)
Vizualizari: 380 | Comentarii: 1 | Tags: Script restrictionare minori | Raging: 0.0/0
Total comentarii : 0
Prenume *:
Email *:
Cod *: