jquery----用户密码验证
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>作业1</title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<style>
.container {
margin-top: 50px;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<form action="#" novalidate>
<div class="form-group">
<label for="username">用户名</label>
<input type="text" class="form-control" id="username" placeholder="username">
<span id="helpBlock" class="help-block"></span>
</div>
<div class="form-group">
<label for="Password">密码</label>
<input type="password" class="form-control" id="Password" placeholder="Password">
<span id="helpBlock2" class="help-block"></span>
</div>
<button type="submit" class="btn btn-default submit">提交</button>
</form>
</div>
</div>
</div>
<script src="jquery.min.js"></script>
<script src="bootstrap.js"></script>
<script>
$(".submit").on("click",function () {
$("form .form-group").removeClass("has-error");
$("form span").text("");
$(":input").each(function () {
if ($(this).val().length===0){
console.log($(this).next().html())
console.log($(this).prev()[0].innerHTML)
var name = $(this).prev().text();
$(this).parent().addClass("has-error");
$(this).next().text(name+"不能为空");
return false
}
});
return false
}) </script>
</body>
</html>
jquery----用户密码验证的更多相关文章
- Squid作代理服务器,用户密码验证,高匿代理
参考URL: https://www.cnblogs.com/vijayfly/p/5800038.html https://www.cnblogs.com/operaculus/p/5705184. ...
- centos7使用tinyproxy搭建简单http(s)服务器,无用户密码验证
1 安装 yum install tinyproxy 2 查找配置文件地址 whereis tinyproxy.conf 3 编辑配置文件 vim tinyproxy.conf 把 allow 12 ...
- ASP.NET CORE配置用户密码验证
在 class Startup 中配置 public void ConfigureServices(IServiceCollection services) { services.AddDbConte ...
- asp core 配置用户密码验证
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; usi ...
- 为什么每个请求都要有用户名密码呢,那不是每次都要查询一下了,token,表示这个用户已经验证通过了,在token有效期内,只需要判断token是否有效就可以了
为什么每个请求都要有用户名密码呢,那不是每次都要查询一下了,token,表示这个用户已经验证通过了,在token有效期内,只需要判断token是否有效就可以了
- Apache服务及个人用户主页功能和密码验证
Apache服务程序中有个默认未开启的个人用户主页功能,能够为所有系统内的用户生成个人网站,确实很实用哦 第1步:开启个人用户主页功能: 1.vim /etc/httpd/conf.d/userdir ...
- laravel修改用户模块的密码验证
做项目的时候,用户认证几乎是必不可少的,如果我们的项目由于一些原因不得不使用 users 之外的用户表进行认证,那么就需要多做一点工作来完成这个功能. 现在假设我们只需要修改登录用户的表,表名和表结构 ...
- (进阶篇)PHP+Mysql+jQuery找回密码
通常所说的密码找回功能不是真的能把忘记的密码找回,因为我们的密码是加密保存的,一般开发者会在验证用户信息后通过程序生成一个新密码或者生成一个特定的链接并发送邮件到用户邮箱,用户从邮箱链接到网站的重置密 ...
- jQuery插件之验证控件jquery.validate.js
今天学习一下jQuery.Validate插件,为便于日后翻阅查看和广大博客园园友共享,特记于此. 本博客转载自:jQuery Validate jQuery Validate 插件为表单提供了强大的 ...
- python_way day17 jQuery表单验证,事件绑定,插件,文本框架,正则表达式
python_way day17 1.jQuery表单验证 dom事件绑定 jquery事件绑定 $.each return值的判断 jquery扩展方法 2.前段插件 3.jDango文本框架 4. ...
随机推荐
- C#网络编程之编码解码
这里是代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using S ...
- 5、JDBC-元信息
DatabaseMetaData:描述数据库的元数据对象 获取所有数据库 import org.junit.jupiter.api.AfterEach; import org.junit.jupite ...
- bootstrap3 input 验证样式【转】
feedback <form role="form"> <div class="form-group has-success has-feedback& ...
- Study 3 —— 表格
表格基本格式: <table> <tr> <td></td> <td></td> </tr> <tr> ...
- ThinkPHP 3.2公共类库、应用类库ThinkPHP/Library讲解
一.ThinkPHP的类库主要包括公共类库和应用类库,都是基于命名空间进行定义和扩展的.只要按照规范定义,都可以实现自动加载. 公共类库 公共类库通常是指ThinkPHP/Library ...
- 微信现金红包 python
微信现金红包发送接口,好像没法限制一个用户一个活动只能领取一次红包,在调用红包接口上,自己做了限制 REDPACK_RECORD 建表sql -- Create table create table ...
- <algorithm>里的sort函数对结构体排序
题目描述 每天第一个到机房的人要把门打开,最后一个离开的人要把门关好.现有一堆杂乱的机房签到.签离记录,请根据记录找出当天开门和关门的人. 输入描述: 每天的记录在第一行给出记录的条目数M (M &g ...
- JAVA实现二叉树(简易版--实现了二叉树的各种遍历)
1,个人感觉二叉树的实现主要还是如何构造一颗二叉树.构造二叉树函数的设计方法多种多样,本例采用 addNode 方法实现.以下程序通过定义内部类来表示二叉树的结点,然后再实现了二叉树这种数据结构的一些 ...
- Python HTML操作(HTMLParser)
HTML操作是编程中很重要的一块,下面用Python3.x中的html.parser中的HTMLParser类来进行HTML的解析. HTMLParser类定义及常用方法 标准库中的定义 class ...
- 深度神经网络tricks and tips
1)data augmentation (augment 增加,aug:to increase 词根,同August(奥古斯特即凯撒大帝,自认为最伟大的帝王,他出生在八月,他以自己的名字命名这个月)同 ...