(十二)easyUI之表单和验证完成登录页面
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
String path = request.getContextPath();
%>
<html>
<head>
<link rel="stylesheet" type="text/css"
href="<%=path%>/script/easyUI-1.4/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css"
href="<%=path%>/script/easyUI-1.4/themes/icon.css">
<script type="text/javascript"
src="<%=path%>/script/easyUI-1.4/jquery-1.8.3.min.js"></script>
<script type="text/javascript"
src="<%=path%>/script/easyUI-1.4/jquery.easyui.min.js"></script>
<script type="text/javascript"
src="<%=path%>/script/easyUI-1.4/locale/easyui-lang-zh_CN.js"></script>
</head>
<script type="text/javascript">
jQuery(function() {
$('#loginAndRegDialog').dialog({
title : '用户登录',
width : 300,
height : 200,
closable : false,
cache : false,
modal : true,
buttons : "#btn"
}); $("#login").bind('click', function() { console.info("login");
}); $('#form1').form({
url :"<%=path%>/userAction/save", onSubmit : function() {
//在提交之前触发,返回false可以终止提交。
console.info("onsubmit方法")
},
success : function(data) {
//在表单提交成功以后触发
console.info("返回值")
}
}); $("#login").bind('click',function(){
$('#form1').submit();
}); }); </script>
<body> <div id="loginAndRegDialog">
<form id="form1" method="post" class="easyui-form">
<div style="margin-top: 20px; margin-left: 60px; margin-right: 60px;">
<input class="easyui-textbox" name="username"
data-options="iconCls:'icon-man',validType:'length[5,10]',prompt:'用户名'"
style="width: 100%; height: 35px">
</div>
<div style="margin-top: 20px; margin-left: 60px; margin-right: 60px;">
<input class="easyui-textbox" name="password"
data-options="iconCls:'icon-man',validType:'length[5,10]',prompt:'密码'"
style="width: 100%; height: 35px">
</div>
<div id="btn">
<a id="login" class="easyui-linkbutton"
data-options="iconCls:'icon-ok'" style="width: 30%; height: 32px">登录</a>
<a id="reg" class="easyui-linkbutton"
data-options="iconCls:'icon-edit'"
style="width: 30%; height: 32px; margin-right: 55px;">注册</a>
</div>
</form> </div>
</body>
</html>


(十二)easyUI之表单和验证完成登录页面的更多相关文章
- 五十二:WTForms表单验证之基本使用
作用:1.做表单验证,把用户提交的数据验证是否合法2.做模板渲染 安装:pip install wtforms 表单验证1.自定义一个表单类,继承wtforms.Form2.定义好需要验证的字段,字段 ...
- 单点登录(十二)-----遇到问题-----cas启用mongodb验证方式登录后没反应-pac4j-mongo包中的MongoAuthenticatInvocationTargetException
cas启用mongodb验证方式登录后没反应 控制台输出 2017-02-09 20:27:15,766 INFO [org.jasig.cas.authentication.MongoAuthent ...
- HTML基础:用表单写一个简易登录页面
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- easyui表单多重验证,动态设置easyui控件
要实现的功能:在做添加学生信息的时候,利用easyui的验证功能判断 学号是否重复和学号只能为数字 最终效果如下图: 但在做这个的过程中,遇到了一系列的问题: 扩展validatebox的验证方法,最 ...
- JaveWeb 公司项目(4)----- Easyui的表单验证
前面三篇博文讲述的是界面的搭建和数据的传输,可以看出目前我做的这个小项目已经有了一个大体的雏形,剩下的就是细节部分的打磨和一些友好的人机交互设计,今天做的是表单的验证,作为初学者,着实花了一番功夫,所 ...
- 表单(上)EasyUI Form 表单、EasyUI Validatebox 验证框、EasyUI Combobox 组合框、EasyUI Combo 组合、EasyUI Combotree 组合树
EasyUI Form 表单 通过 $.fn.form.defaults 重写默认的 defaults. 表单(form)提供多种方法来执行带有表单字段的动作,比如 ajax 提交.加载.清除,等等. ...
- EasyUI加zTree使用解析 easyui修改操作的表单回显方法 验证框提交表单前验证 datagrid的load方法
带参提交一次查询,从服务器加载新数据.这是一个神奇的方法 $('#dg').datagrid('load',{ code: '01', name: 'name01' }); easyui修改操作的回显 ...
- ajax提交表单无法验证easyui的验证选项(比如required等)
在实际开发中,遇到ajax方式提交表单没法验证easyui的验证选项,这对实际用户体验造成了很大的困扰.当然,这也是理所当然的事情. 解决办法:使用jquery中ajax的beforeSend事件 ...
- [Swift通天遁地]二、表格表单-(18)快速应用多种预定义格式的表单验证
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...
随机推荐
- legend3---lamp.sh常用操作
legend3---lamp.sh常用操作 一.总结 一句话总结: 1.github上下载代码 2.修改项目数据库配置,修改文件权限等操作:chown -R apache:apache /data/w ...
- OpenJudge计算概论-求字母的个数(统计元音字母个数)
/*======================================================================= 求字母的个数 总时间限制: 1000ms 内存限制: ...
- Tosca new project Repository as MS SQL Server
# 然后对应的服务器就能自己给创建对应的数据库
- 使用docker运行mysql
以前开发的时候都是用本地的sqlite开发,但是极少数情况下,sqlite支持的语法发布到服务器上链接mysql会报错. 为了避免这种现象,还是链接本地mysql开发还是更稳定的, 可是开发的项目多了 ...
- osg qt fbx ifc bim osg ive 3ds max rvt
项目环境变量配置 include E:\Qt\Qt5.12.2\5.12.2\msvc2017_64\include E:\OpenSourceGraph\OpenSceneGraph_install ...
- iOS 点击空白处收回键盘的几个简单代码
//收回键盘1 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self.view.subviews enumer ...
- ubuntu 16.04 修改网卡显示名称
~# sudo nano /etc/default/grub找到:GRUB_CMDLINE_LINUX=""改为:GRUB_CMDLINE_LINUX="net.ifna ...
- 如何让在panel里的子窗体随panel的大小改变而变化?(转)
private void Form1_Load(object sender, EventArgs e) { frm=new Form2(); ...
- (九)Centos之搜索命令whereis、which和字符串搜索命令grep
一.Centos之命令搜索命令whereis与which 1.1 whereis 命令名(搜索命令所在路径及帮助文档所在位置) 选项: -b :只查找可执行文件位置 -m:只查找帮助文件 1.2 wh ...
- caffe dropout解读
先上caffe dropout_layer.cpp源码,如下: // LayerSetUp DCHECK(threshold_ > 0.); DCHECK(threshold_ < 1.) ...