»
EnglishFrenchVietnamese

Print - Mr. Potato Head - JavaScriptBank.com

Full version: jsB@nk » Game » Mr. Potato Head
URL: https://www.javascriptbank.com/mr-potato-head.html

Mr. Potato Head © JavaScriptBank.comPlay a good old game of Mr. Potato Head - powered by JavaScript, of course! Click buttons to change the hair, eyes, nose, and mouth! And, click the 'View It' button to see Mr. Potato Head!

Full version: jsB@nk » Game » Mr. Potato Head
URL: https://www.javascriptbank.com/mr-potato-head.html



HTML
<SCRIPT LANGUAGE="JavaScript">// Michael Tartaglia (stonedstan@hotmail.com)<!-- Beginvar h=0,e=0,n=0,m=0;var hChose="", eChose=":", nChose="-", mChose=")";document.write("<FORM NAME=\"theForm\"><CENTER>"+ "<input type=text size=20 name=face>"+"<BR><input type=button value=Hair onClick='changeHair()'>"+"<input type=button value=Eyes onClick='changeEyes()'>"+"<input type=button value=Nose onClick='changeNose()'>"+"<input type=button value=Mouth onClick='changeMouth()'>  ");document.write("<input type=button value=View onClick='viewIt()'>");document.write("</CENTER></FORM>");document.theForm.face.value=hChose+" "+eChose+" "+nChose+mChose;hair=new Array("","[[[","2","3","(","\\/\\/","Ç");eyes=new Array("B",":\'",">:","<:",":",";","¦");nose=new Array("- ","^ ","* ","~ ","¤ ","");mouth=new Array("ÃΕΎ","O","}","|",")","(",")~~",")===");function changeHair() {if (h == 6) {h=0} else (h++)hChose = hair[h];document.theForm.face.value=hChose+" "+eChose+" "+nChose+mChose;}function changeEyes() {if (e == 6) {e=0} else (e++)eChose = eyes[e];document.theForm.face.value=hChose+" "+eChose+" "+nChose+mChose;}function changeNose() {if (n == 5) {n=0} else (n++)nChose = nose[n];document.theForm.face.value=hChose+" "+eChose+" "+nChose+mChose;}function changeMouth() {if (m == 7) {m=0} else (m++)mChose = mouth[m];document.theForm.face.value=hChose+" "+eChose+" "+nChose+mChose;}function viewIt() {mth="";for (i=1;i<=mChose.length;i++) {mth += mChose.charAt(i)}see=window.open('','','width=200,height=175,toolbar=no,status=no,scrolling=no');see.document.write("<HTML><HEAD><TITLE>Mr. Potato Head</TITLE></HEAD><BODY>"+ "<CENTER><FONT SIZE=7><B>"+hChose+" <FONT COLOR=blue>"+ eChose + " </FONT>" + nChose + " <FONT COLOR=red>" + mChose.charAt(0) + "</FONT>" + mth + "</B></FONT><br><br>"+ "<FONT SIZE=2><I>Mr. Potato Head!</I></FONT><br>"+ "<FONT SIZE=1>(<a href=\"javascript:this.close()\">"+ "close</a>)</FONT></CENTER></BODY></HTML>");}// End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->