THE VOID |
|||
March 18, 2024 - Randomizing Code (JS)Here's my favorite code to display a random message or picture on your website each time the page is reloaded. I don't actually know Javascript (or anything other than HTML) but I stole this code off of google and fell in love with it:
<script language="javascript"> This code creates an array (list of things) and mixes it up so that when you tell the script to write a certain entry in the array it gives you a random thing out of the array. I also have code on my website that gives me one random thing out of a set, but I prefer this code because it can be used to create many random selections that don't repeat. Tips:
ExampleCharacters from: Rainy's Home on the Wayback Machine
|
HTML Tips from the Lists page:
image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; } How to make this div#pasteldiv { |