Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body bgcolor="#000000" onload="var i=setInterval('drawit()',100);">
- <canvas id="myCanvas" width="1000" height="1000" style="border:10px;color:red;">
- Your browser does not support the HTML5 canvas tag.</canvas>
- <script>
- var onetimecolor=prompt("Enter Your Favorite Color:(ie:Red)");
- function drawit(){
- var c = document.getElementById("myCanvas");
- var ctx = c.getContext("2d");
- ctx.strokeStyle=(onetimecolor);
- ctx.lineThickness= "1000";
- for(var i=0;i<20;i++){
- ctx.beginPath(Math.random()*1000,Math.random()*1000);
- var Line=(Math.random()*1000);
- var Line1=(Math.random()*1000);
- ctx.moveTo(Line1+Math.floor(Math.random()*500), Line);
- ctx.lineTo(Line, Line1-Math.floor(Math.random()*500));
- ctx.stroke();
- }
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment