<!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>Document</title>
</head>
<body>
<div class="box">
<input id="input" type="text" value="" />
<input id="button" onclick="getCode()" type="button" value="获取验证码">
</div>
</body>
<script>
function getCode() {
let input = document.getElementById('input'),
button = document.getElementById('button'),
time = 60,
validCode = true,
timer;
if (butto
获取短信验证码案例
最新推荐文章于 2024-06-04 14:33:38 发布
![](https://img-home.csdnimg.cn/images/20240611030827.png)