Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Test</title>
- <script language='javascript' type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.16/p5.js'></script>
- <script language='javascript' type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.16/addons/p5.dom.js'></script>
- <script>
- var test;
- var url = 'http://tutaj jest adres mojej strony';
- function setup() {
- test = select('#test');
- test.mousePressed(clicked);
- }
- function draw() {
- }
- function clicked() {
- httpDo(url,
- {
- method: 'GET',
- headers: { COMMAND: 'ROLL_UP' }
- },
- function () {
- background(50);
- },
- function () {
- background(color(200, 0, 0));
- });
- }
- </script>
- </head>
- <body>
- <button id='test'>Test</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement