Jump to content

fool

Members
  • Posts

    863
  • Joined

  • Last visited

  • Days Won

    14

fool last won the day on February 19 2019

fool had the most liked content!

fool's Achievements

Newbie

Newbie (1/14)

40

Reputation

  1. Who's here familiar with JavaScript?
  2. Just found this on google; https://codepen.io/juliogcampos/pen/BzdjwY It's good now, just need to replace onclick with addEventListener.
  3. No, can't this be done with vanilla JavaScript?
  4. Okay Ralph, I read all your replies and they're very helpful. Need a little bit of help here <h1>0</h1> <button>+</button> Can you write a simple function so that on every click on <button>+</button>, <h1>0</h1> will increase? I'm kinda stuck here. Tried to write it several ways but failed. const button = document.querySelector('button') const counter = document.querySelector('h1') button.addEventListener('click', function(){})
  5. Okay, seriously need some JavaScript help here since I can't find it on Google. function GenerateRandomColor() { return '#' + Math.floor(Math.random()*16777215).toString(16); } What does '#' mean?
  6. Need some help here, how to make the result not repeat itself? For example, if the color is red, the next click shouldn't be red also? <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>01</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"> </head> <body> <div class="container"> <div class="row vh-100 d-flex align-items-center"> <div class="col text-center"> <button>Click Me!</button> </div> </div> </div> </div> <script> const button = document.querySelector('button') const body = document.querySelector('body') const colors = ['red', 'green', 'blue', 'yellow', 'pink', 'purple'] body.style.backgroundColor = 'violet' button.addEventListener('click', changeBackground) function changeBackground(){ const colorIndex = parseInt(Math.random()*colors.length) body.style.backgroundColor = colors[colorIndex] } </script> </body> </html>
  7. fool

    What

    Is Jeff Bezos even human?
  8. fool

    What

    What? Ralph's not running this site anymore? Who's Cloaked? Amazon's AWS?
  9. fool

    Mark.B is a rat

    So dumdum doesn't have a working website right now? Kinda miss him.
  10. fool

    Mark.B is a rat

    Can someone link me to dumdum's new website?
  11. What's dumdum's new website?
  12. Heil Hitler!
  13. I wanna fuck Furry in the ass, just saying.
  14. Zareta should go to jail for criminally negligent manslaughter. He found a gun, recklessly touched it and resulted in the accidental death of another person. The pig cops who shot and the other one who gave conflicting orders should get either life or death penalty. This case is flat out murder. The victim family should appeal directly to the federal government and get a federal trial. No justice, no peace. I doubt these pigs can get away with this in Britain but then again British police aren't pigs.
×
×
  • Create New...