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. ...
随机推荐
- models.DateTimeField(auto_now_add=True) 与 models.DateTimeField(auto_now=True)
DateTimeField和DateField和TimeField存储的内容分别对应着datetime(),date(),time()三个对象. 对于auto_now=False和auto_now_a ...
- CentOS 7使用yum安装MYSQL
来源:https://typecodes.com/linux/yuminstallmysql5710.html wget -i http://dev.mysql.com/get/mysql57-com ...
- js的各种验证
验证手机号格式是否正确 // 判断是否为手机号 isPoneAvailable: function (pone) { var myreg = /^[1][3,4,5,7,8][0-9]{9}$/; i ...
- filebeat多个key
filebeat.prospectors:- type: log paths: - D:\logs\iis\W3SVC2\*.log exclude_lines: ['^#'] multiline: ...
- 挖洞姿势:特殊的上传技巧,绕过PHP图片转换实现远程代码执行(RCE)
我使用了一个特殊的图片上传技巧,绕过PHP GD库对图片的转换处理,最终成功实现了远程代码执行. 事情是这样的.当时我正在测试该网站上是否存在sql注入漏洞,不经意间我在网站个人页面发现了一个用于上传 ...
- Nginx动态添加模块
前言 有时候要使用已安装好的Nginx的功能时,突然发现缺少了对应模块,故需对其进行动态添加模块. 操作 # 查看已安装模块 [root@kazihuo ~]# nginx -V nginx vers ...
- 【转】基于VSM的命名实体识别、歧义消解和指代消解
原文地址:http://blog.csdn.net/eastmount/article/details/48566671 版权声明:本文为博主原创文章,转载请注明CSDN博客源地址!共同学习,一起进步 ...
- Spring 学习03
一.上节内容回顾 1 注解ioc操作 (1)使用注解创建对象 - 四个注解 (2)使用注解注入属性 - 两个注解 2 aop (1)aop原理 (2)aop术语 - 切入点 - 增强 - 切面 3 s ...
- CSS3美化有序列表
如图效果: <ol class="rightList"> <li> <span>周波</span> <span>< ...
- 2.SpringBoot HelloWorld详解
1.POM文件 父项目 <parent> <groupId>org.springframework.boot</groupId> <artifactId> ...