登录注册模块

注册

功能(短信验证,MD5加密,滑块验证)

注册页面

<%--
  @User Zhoudalf
  @Create 2022-04-30 10:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>Title</title>

    <link rel="stylesheet" href="static/css/range.css" />
    <script type="text/javascript" src="static/js/jquery-3.6.0.min.js"></script>
</head>
<body>
<%application.setAttribute("ss","dsd");%>
<div id="container" style="width: 550px; margin: 20px auto">
    <div id="header" style="font-size: 25px;
         text-align: center;
         margin-bottom: 10px;">注册中心</div>

    <form action="${pageContext.request.contextPath}/register" method="post" autocomplete="off">
        <div >
            <div>
                <input type="text"  id="phone" name="phone" placeholder="请输入手机号码">
            </div>
        </div>
        <div >
            <input type="text" name="securityCode"   placeholder="请输入验证码">
        </div>
        <div><label><span>密码:</span><input type="text" name="pw" placeholder="请输入8到20位数字+字母的密码"/></label></div>
        <button id="registerBtn">注册</button>

    </form>
    <div style="justify-content:flex-end;display: flex;">
        <button type="button"   id="send">点击获取验证码</button>
    </div>
</div>
<%--滑块--%>
<div class="container">
    <div id="captcha" style="position: relative">

    </div>
</div>
<script type="text/javascript">
    (function(window) {
        const l = 42, // 滑块边长
            r = 10, // 滑块半径
            w = 310, // canvas宽度
            h = 155, // canvas高度
            PI = Math.PI
        const L = l + r * 2 // 滑块实际边长
        function getRandomNumberByRange(start, end) {
            return Math.round(Math.random() * (end - start) + start)
        }
        function createCanvas(width, height) {
            const canvas = createElement('canvas')
            canvas.width = width
            canvas.height = height
            return canvas
        }
        function createImg(onload) {
            const img = createElement('img')
            img.crossOrigin = "Anonymous"
            img.onload = onload
            img.onerror = function() {
                img.src = getRandomImg()
            }
            img.src = getRandomImg()
            return img
        }
  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值