<html>
<head>
<title>Page Title</title>
</head>
<body>
<p id="mydiv"></p>
<script>
function generate() {
let crosshairsize = Math.ceil(Math.random() * 200);
let crosshairthickness = Math.ceil(Math.random() * 200);
let crosshairgap = Math.ceil(Math.random() * 200);
let crosshairalpha = Math.ceil(Math.random() * 3);
let crosshairstyle = Math.ceil(Math.random() * 4);
let crosshairdot = Math.ceil(Math.random() * 2);
let crosshaircolor = Math.ceil(Math.random() * 5);
if (crosshairalpha == 1) {
crosshairalpha = 50;
}
if (crosshairalpha == 2) {
crosshairalpha = 80;
}
if (crosshairalpha == 3) {
crosshairalpha = 100;
}
crosshairstyle += 1;
crosshairdot -= 1;
result_crosshair = "cl_crosshairsize " + crosshairsize + "; cl_crosshairthickness " + crosshairthickness + "; cl_crosshairgap " + crosshairgap + "; cl_crosshairalpha " + crosshairalpha + "; cl_crosshairstyle " + crosshairstyle + "; cl_crosshairdot " + crosshairdot + "; cl_crosshaircolor " + crosshaircolor + ";";
document.getElementById("mydiv").innerHTML =result_crosshair;
}
generate();
</script>
<br>
<center><button id="update" onclick="generate()">Обновить</button></center>
</body>
</html>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.