what is wrong with my html/javascript?

Anon Ymouse

New member
<html>
<head>
<script type="text/javascript">

function touched()
{
alert("I Told you not to touch me!!!!!");
alert("you should have listened!");
alert("do it again and i will keeelll you!");
}

function prompt()
{
var x = prompt("Hey there, buddy! What's your name?", "");
alert("well then hello there " + x + "!");
alert("the goal of the game " + x + ", is to click the center button, and do it without clicking the outer shell buttons");
alert("yea? sounds easy? well LISTEN HERE " + x + "!, you couldnt be more wrong!");
}

function win()
{
alert("hawly crap you did it " + x + ".");
alert("well i owe you an appology there " + x + "...too bad:P");
alert("but i suppose should reward you...");
alert("here have a cookie :P");
alert("eww, you eat like a pig");
alert("*sniffle* just like mah mamma did! *sniffle!*");
alert("Goodluck, " + x + "! *sniffle* *sniffle!*");
}

</script>
</head>

<body bgcolor="red" onload="prompt()">
<div align="center">
<input type="button" name="DONT CLICK ME!!!" onMouseOver="touched()" value="DONT CLICK ME!!!" />
<br />
<input type="button" name="DONT CLICK ME!!!" onmouseover="touched()" value="DONT CLICK ME!!!" />
<input type="button" name="click me" onClick="win()" value="click me" />
<input type="button" name="DONT CLICK ME!!!" onMouseOver="touched()" value="DONT CLICK ME!!!" />
<br />
<input type="button" name="DONT CLICK ME!!!" onMouseOver="touched()" value="DONT CLICK ME!!!" />
</div>
</body>
</html>

the prompt doesnt work, some error on line 14 :/
 
Back
Top