当前位置:网站首页>Click to generate 4-bit random number and verify code setting
Click to generate 4-bit random number and verify code setting
2022-06-12 12:04:00 【Mustang (Mustang)】
Click to generate 4-digit random digits and numbers
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title> Click to generate random number </title>
<style>
span{
display: block;
width: 110px;
height: 50px;
border: 1px solid red;
text-align: center;
line-height: 50px;
}
</style>
</head>
<body>
<span id="demo" onclick="init();"></span>
<script>
init();
function init(){
var arr=[];
for(var i=48;i<123;i++){
if(i>57 && i<65) continue;
if(i>90 && i<97) continue;
arr.push(String.fromCharCode(i));
}
arr.sort(function () {
return Math.random()-0.5;
});
arr.length=4;
var span= document.getElementById('demo');
span.textContent=(arr.join(""));
}
</script>
</body>
</html>
边栏推荐
- Lambda and filter, List 和 numpy array的索引,以及各种距离指标distance-metrics,拼接数组以及axis=0 and axis=1的区分
- ARM指令集之伪指令
- 5g NR protocol learning -- ts38.211 downlink channel
- 机器学习之决策树
- object.defineProperty 基本使用
- bind、call、apply三者的区别,还有bind()的封装
- Google Earth engine (GEE) - quick land classification by kmeans clustering (double for loop quick parameter adjustment)
- 【深度学习基础】反向传播法(1)
- LeetCode 890. 查找和替换模式(模拟+双哈希表)
- mysql复习
猜你喜欢

B.刷墙(C语言)

TinyMCE series (II) TinyMCE plug-in development

Inter class and intra class relations in video classification -- regularization

mysql复习

Asynchronous path processing

导航中,添加边框影响布局的解决方法

ARM processor mode and register

Ficusjs series (I) introduction to ficusjs

Beyondcompare 4 uses PJ

Lambda and filter, List 和 numpy array的索引,以及各种距离指标distance-metrics,拼接数组以及axis=0 and axis=1的区分
随机推荐
Getting started with NVIDIA Jetson nano Developer Kit
TinyMCE realizes automatic uploading of pasted pictures
[foundation of deep learning] back propagation method (1)
Rich text editor copying pictures in word documents
ARM指令集之数据处理类指令
DOM+JS+轮播图+无时间
PDSCH related
ioremap
MVC模式、加密、jsonwebtoken
One must keep writing, so as not to be submerged by the vast crowd.
Blue Bridge Cup 2015 CA provincial competition (filling the pit)
Neighbor item status update of neighbor subsystem
LeetCode_二分搜索_中等_162. 寻找峰值
ioremap
Create servlet project
Automatic generation of folder directory structure
Must do skill -- use ffmpeg command to quickly and accurately cut video
淘宝新改版商家如何操作,需要注意的点有哪些
A.前缀极差
LeetCode_ Binary search_ Medium_ 162. looking for peaks