0
How to...
How to make random numbers in html, css, js?
3 ответов
+ 2
Math.random() call in JS returns a floating point number between 0 and 1. Multiply by 10 to get a number between 0 and 10. Call Math.floor passing that number to get an integer between 0 and 9.
+ 1
Thanks!
0
Technically you can only make random numbers using JavaScript. HTML is only markup and CSS is for design.
Anyway, use Math.random().