【发布时间】:2021-03-15 06:51:21
【问题描述】:
我想在 JavaScript 中生成随机 a - z 字母(1 个字母)而不输入所有字母。但我不知道怎么做。我想使用Math.floor(Math.random * ?)。但我不知道是什么?。我想在这段 HTML 代码中使用 JavaScript:
<!DOCTYPE html>
<html>
<head>
<title>AZ Generator</title>
</head>
<body>
<script src="az-generator.js"></script>
<button onclick="az()">Generate</button>
<p id="p"></p>
</body>
</html>
【问题讨论】:
-
不使用随机数将很难做到这一点。
标签: javascript html