If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

JavaScript Button

I have been messing around with this "barrel roll" script and I was wondering how to have it as a button so it only worked when someone clicks it rather than starting immediately when the page opens and not stopping… here is the script, how can I make it a button?
(function()%7Bvar%20s=document.createElement('style');s.innerHTML='@-moz-keyframes%20roll%20%7B%20100%25%20%7B%20-moz-transform:%20rotate(360deg);%20%7D%20%7D%20@-o-keyframes%20roll%20%7B%20100%25%20%7B%20-o-transform:%20rotate(360deg);%20%7D%20%7D%20@-webkit-keyframes%20roll%20%7B%20100%25%20%7B%20-webkit-transform:%20rotate(360deg);%20%7D%20%7D%20body%7B%20-moz-animation-name:%20roll;%20-moz-animation-duration:%204s;%20-moz-animation-iteration-count:%201;%20-o-animation-name:%20roll;%20-o-animation-duration:%204s;%20-o-animation-iteration-count:%201;%20-webkit-animation-name:%20roll;%20-webkit-animation-duration:%204s;%20-webkit-animation-iteration-count:%201;%20%7D';document.getElementsByTagName('head')%5B0%5D.appendChild(s);%7D());