»
AnglaisFran�aisVietnamien

Imprimer - Fortune Cookie Redux - JavaScriptBank.com

Version compl�te: jsB@nk » Game » Fortune Cookie Redux
URL: https://www.javascriptbank.com/fortune-cookie-redux-index.html

Fortune Cookie Redux © JavaScriptBank.comParlez-en à votre fortune et de numéros de la chance avec le clic d'un bouton. Eh bien, pas votre véritable fortune et la chance de chiffres, mais il vous donnera de belles paroles et générer nombres aléatoires. Facilement paramétrable pour les différents dictons. Vous pouvez utiliser soit du texte ou des graphiques.

Version compl�te: jsB@nk » Game » Fortune Cookie Redux
URL: https://www.javascriptbank.com/fortune-cookie-redux-index.html



CSS
<style type=text/css>#fortuneTwo, #numbersTwo {  height: 41px;  width: 275px;  margin: 0px auto 0px auto;  padding-top: 10px;}#numbersTwo {  height: 36px;  width: 275px;  margin: 0px auto 0px auto;  padding-top: 15px;}</style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<script type=text/javascript name="fortuenCookie.js">// Created by: John Hobbs :: http://www.velvetcache.org/var quotes = new Array(16) // Add your quotes below  quotes[0]="Your talents will be recognized and suitably rewarded.";  quotes[1]="He who hurries cannot walk with dignity.";  quotes[2]="Your success in life must be earned with earnest efforts.";  quotes[3]="You love peace.";  quotes[4]="A friend asks only for your time and not your money.";  quotes[5]="You will soon inherit a piece of land.";  quotes[6]="Your luck is about to change.";  quotes[7]="Things will soon go your way.";  quotes[8]="He who stands on toilet is high on pot.";  quotes[8]="Everybody is ignorant, only on different subjects.";  quotes[9]="Fortune favors the brave.";  quotes[10]="There is nothing permanent except change.";  quotes[11]="You haven't failed until you give up.";  quotes[12]="Your ability to juggle many tasks will take you far.";  quotes[13]="Broke is only temporary; poor is a state of mind.";  quotes[14]="Begin nothing until you have considered how it is finished.";  quotes[15]="A huge fortune at home is not as good as money in use.";function fortune(objID) {  var rand_int = Math.floor(Math.random()*16); // Get a number for picking the quote  document.getElementById(objID).innerHTML=(quotes[rand_int]); // Put the quote in the box}function numbers(objID) {  var space = ('      ') // Spacer for between numbers  var rand_inta = Math.floor(Math.random()*100); // Get first number  var rand_intb = Math.floor(Math.random()*100); // Get second number  var rand_intc = Math.floor(Math.random()*100); // Get third number  var rand_intd = Math.floor(Math.random()*100); // Get fourth number  var rand_inte = Math.floor(Math.random()*100); // Get fifth number  document.getElementById(objID).innerHTML=(rand_inta+space+rand_intb+space+rand_intc+space+rand_intd+space+rand_inte); //Print it all into the second box}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<span id="fortune"></span><br><a onclick="fortune('fortune')"><b>Click for your fortune:</b></a><p><span id="numbers"></span><br><a onclick="numbers('numbers')"><b>Click for your numbers:</b></a><!-- Or, to use the graphics ...  -->  <img src="cookie.jpg" alt="The Fortune Cookie">  <div id="fortuneTwo"></div>  <img src="submit.jpg" alt="sumbit" onclick="fortune('fortuneTwo');">  <div id="numbersTwo"></div>  <img src="submit2.jpg" alt="sumbit" onclick="numbers('numbersTwo');"><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/game/Fortune_Cookie_Redux/cookie.jpghttp://javascriptbank.com/javascript/game/Fortune_Cookie_Redux/submit2.jpghttp://javascriptbank.com/javascript/game/Fortune_Cookie_Redux/submit.jpg