JQuery EasyUI使用笔记

JQuery EasyUI使用笔记

1.easyui中控件的使用方式

有两种方式,一种是在html的控件中以class的形式申明,一种在js中以对象的形式申明。

第一种:

<div class="easyui-panel"

style="width:500px;height:200px;padding:10px 100px" title="----物流系统----登录">

<form id="loginForm" method="post">

一般class的名字规则: easyui-+控件名

如:easyui-panel

第二种:

$('#loginForm').form('submit',

{ url : js+'system/loginOperator.action',

onSubmit : function() {

}, success : function(data) {


 }

} });

2. form的配置

$('#loginForm').form('submit', {

url : js+'system/loginOperator.action',

onSubmit : function() {

//记住密码

if($("#mindpwd").attr("checked")){

$.cookie("userinfo",$("#operatorCode").val()+"§"+$("#password").val(),{expires: 30,path:'/'});

}else{

$.cookie("userinfo",null,{path:'/'});

}

return $(this).form('validate');

},

success : function(data) {

var result = eval('(' + data + ')');

if(result.success=='1'){

var location = js+"main.action";

window.location=location;

}else if(result.success=='0'){

$.messager.alert('提示:',result.msg,'error');

}

}

});

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值