Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Sorteio</title>
- </head>
- <body>
- <!-- Coloca o numero aleatório dentro do H1 -->
- <h1>
- <script type="text/javascript">
- var min = 0;
- var max = 40;
- document.write( Math.floor( Math.random() * ( max - min + 1 ) ) );
- </script>
- </h1>
- <br>
- <!-- Recarrega a página -->
- <button onclick="window.history.go( 0 )">Novo Numero (de 0 a 40)</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement