<html> <head> </head> <body> <input type="input" id="mytext"> <br> <input type="button" onclick="generate()" value="сгенерировать">
<script> function generate(){ let elem = document.getElementById("mytext"); let arr = [0,1,2,3,4,5,6,7,8,9,"A","B","C","D","E","F"]; let hex ="";
for (let i = 0; i < 10;i++){ hex += arr[Math.floor(Math.random()*16)]; } elem.value =hex;
}
</script>
</body> </html>