功能:
1、可以查看/隐藏密码
2、校验手机号
3、发送信息60秒倒计时
准备好
jquery-1.10.2.min.js
bootstrap.min.js
代码:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<meta charset="UTF-8">
<title>注册模态框</title>
<%-- <link rel="stylesheet" href="/css/bootstrap.min.css">--%>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" />
<style>
#h-btn{
display:inline-block;
/*border:1px solid red;*/
width:30px;
height:33px;
position:absolute;
right:2px;
z-index:100;
cursor: pointer;"
}
/*将number的按钮去掉*/
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button{
-webkit-appearance: none;
}
</style>
</head>
<body>
<button class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
打开注册
</button>
<div class="modal" id="exampleModal" tabindex="-1" role="dialog"><!--role的作用是描述一个非标准的tag的实际作用。比如用div做button,那么设置div 的 role=“button”,辅助工具就可以认出这实际上是个button-->
<div class="modal-dialog">
<div class="modal-content">
<%-- <div class="modal-header">--%>
<%-- </div>--%>
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true" style="display: block; margin-right: 20px;">×</span> <!-- aria-hidden="true" 没有什么作用(有没有都无所谓) -->
</button>
<h4 class="modal-title" id="myModallabel" style="font-family: 宋体; font-size: 20px; font-weight: 800; margin-left: 10px; margin-top: 10px;">欢迎注册</h4>
<div class="modal-body">
<form class="form-group" role="form">
<div class="form-group input-group has-info has-feedback">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input type="number" class="form-control" name="username" placeholder=