gregm54 | Bonsoir,
J'aimerais qu'une fois cliqué, un bouton se grise et se desactive pour que l'on ne puisse plus générer de phrases!
Voici un code pour génerer des phrases qui est pas mal fait, je demande juste a savoir comment desactiver le bouton une fois qu'il aura été cliqué!
Code :
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <title>Nouvelle page 1</title>
- </head>
- <body>
- <form name="scriptform"><input name="scriptinput" size=70 style="border-width:1px solid black;font:Arial"> <input type="button" value="Random" onClick="randomdisplay()"></form>
- <script>
- //Satirical Punch Line Script- by javascriptkit.com (text by Colin Lingle)
- //Visit JavaScript Kit (http://javascriptkit.com) for script
- //Credit must stay intact for use
- quotes = new Array();
- quotes[0]="Warning: Dates in Calendar are closer than they appear.";
- quotes[1]="Daddy, why doesn't this magnet pick up this floppy disk?"
- quotes[2]="Give me ambiguity or give me something else."
- quotes[3]="I.R.S.: We've got what it takes to take what you've got!"
- quotes[4]="We are born naked, wet and hungry. Then things get worse."
- quotes[5]="Pentiums melt in your PC, not in your hand."
- quotes[6]="Suicidal twin kills sister by mistake!"
- quotes[7]="Did anyone see my lost carrier?"
- quotes[8]="Make it idiot proof and someone will make a better idiot."
- quotes[9]="I'm not a complete idiot, some parts are missing!"
- quotes[10]="He who laughs last thinks slowest!"
- quotes[11]="Always remember you're unique, just like everyone else."
- quotes[12]="Save the whales, collect the whole set"
- quotes[13]="A flashlight is a case for holding dead batteries."
- quotes[14]="Lottery: A tax on people who are bad at math."
- quotes[15]="There's too much blood in my caffeine system."
- quotes[16]="Artificial Intelligence usually beats real stupidity."
- quotes[17]="Hard work has a future payoff. Laziness pays off now."
- quotes[18]="Friends help you move. Real friends help you move bodies."
- quotes[19]="I wont rise to the occaasion, but I'll slide over to it."
- quotes[20]="Ever notice how fast Windows runs? Neither did I."
- quotes[21]="Double your drive space - delete Windows!"
- quotes[22]="What is a free gift ? Aren't all gifts free?"
- quotes[23]="If ignorance is bliss, you must be orgasmic."
- quotes[24]="Very funny, Scotty. Now beam down my clothes."
- quotes[25]="Puritanism: The haunting fear that someone, somewhere may be happy."
- quotes[26]="Consciousness: that annoying time between naps."
- quotes[27]="Oops. My brain just hit a bad sector."
- quotes[28]="I used to have a handle on life, then it broke."
- quotes[29]="Don't take life too seriously, you won't get out alive."
- quotes[30]="I don't suffer from insanity. I enjoy every minute of it."
- quotes[31]="A pedestrian hit me and went under my car."
- quotes[32]="Better to understand a little than to misunderstand a lot."
- quotes[33]="The gene pool could use a little chlorine."
- quotes[34]="When there's a will, I want to be in it."
- quotes[35]="Okay, who put a stop payment on my reality check?"
- quotes[36]="Few women admit their age. Few men act theirs."
- quotes[37]="I'm as confused as a baby in a topless bar."
- quotes[38]="We have enough youth, how about a fountain of SMART?"
- quotes[39]="All generalizations are false, including this one."
- quotes[40]="Change is inevitable, except from a vending machine."
- quotes[41]="C program run. C program crash. C programmer quit."
- quotes[42]="Criminal Lawyer is a redundancy."
- quotes[43]="640K ought to be enough for anybody. - Bill Gates 81"
- quotes[44]="90% of all statistics are made up"
- quotes[45]="A man needs a good memory after he has lied."
- quotes[46]="A little work, a little sleep, a little love and it is all over."
- quotes[47]="A lot of people mistake a short memory for a clear conscience."
- quotes[48]="Apple copyright 6024 b.c., Adam & Eve"
- quotes[49]="Apple Copyright 1767, Sir Isaac Newton."
- quotes[50]="Bad knee, gotta run - Pat Buchanan to his draft board"
- quotes[51]="Beam me aboard, Scotty..... Sure. Will a 2x10 do?"
- quotes[52]="Beulah, peel me a grape."
- quotes[53]="Bother, said Pooh as the brakes went out!"
- quotes[54]="Build a watch in 179 easy steps - by C. Forsberg."
- quotes[55]="C++ should have been called B"
- quotes[56]="COINCIDENCE happens."
- quotes[57]="Calvin, we will not have an anatomically correct snowman!"
- quotes[58]="Careful. We don't want to learn from this. -- Calvin"
- quotes[59]="Energizer Bunny Arrested! Charged with battery."
- function randomdisplay(){
- randomquote=quotes[Math.floor(Math.random()*quotes.length)]
- document.scriptform.scriptinput.value=randomquote
- }
- setTimeout("randomdisplay()",100)
- </script>
- <p align="center"><font face="arial" size="-2">This free script provided by</font><br>
- <font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
- Kit</a></font></p></body>
- </html>
|
Merci d'avance, |