Make your own free website on
SWAT My Welcome Of Doom to you!!!
  Javascript Actionscript Blog
Mad Lib#1 Mad Lib

Please enter the following information

A person's name
A hilarious sound
A body part
A vehicle
A type of animal
function makeML() {
// Mad Lib
// David Fang 10/07
// make a silly story from a bunch of input terms
//get variable from form
var person=window.document.myForm.txtPerson.value;
var sound=document.myForm.txtSound.value;
var part=document.myForm.txtPart.value;
var vehicle=document.myForm.txtVehicle.value;
var animal=document.myForm.txtAnimal.value;
var story="";
story="One day, a person named ";
story +=person;
story +="was walking down the street. Suddenly, ";
story +=person;
story +="heard an awful";
story +=sound;
story +="sound.";
story +=person;
story +="looked around and saw that the ";
story +=sound;
story +="sound was coming from a ";
story +=vehicle;
story +=careening madly down the street. ";
story +=person;
story +=";s fear turned to terror as "
story +=person;
story +="realized that the ";
story +=vehicle;
story +="was driven by none other than the evil super-";
story +=animal;
story +=". Once an ordinary";
story +=animal;
story +=", it had befallen a strange trnasformation after";
story +="being dropped in a vat of nuclear waste.";
story +="Super-
story +=animal;
story +="continued to taunt";
story +=person
story +="with the horrible";
story +=sound;
story +="noise, but";
story +=person;
story +="was unconcerned. \"You can't bother me, Super-";
story +=animal;
story +="! I know how to turn the other ";
story +=part;
story +="!\" \nThe End."
Mad Lib#1
<hl>Mad Lib<hr></hl>
<form name=myForm>
<h3>Please enter the following information</h3>
<table border=1>
<td>A person's name</td>
<td><input type=text name=txtPerson/></td>
<td>A hilarious sound</td>
<td><input type=textname=txtSound/></td>
<td>A body part</td>
<td><input type=textname=txtPart/></td>
<td>A vehicle</td>
<td><input type=textname=textVehicle/></td>
<td>A type of animal</td>
<td><input type=textname=txtAnimal/></td>
<td colspan=2><center>
<input type=button
value="click for story"
<textarea name=txtStory





Contact me

Class links

Computer Science

Five Classmates

1. Julio Maravilla

2. Norman Duong

3. Huy Vo

4. Titus Green

5. Jack Li

Home Product Contact order