52,797
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>login</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="jeasyui/jquery.min.js" charset=UTF-8></script>
<script type="text/javascript" src="jeasyui/jquery.easyui.min.js" charset=UTF-8></script>
<link rel="stylesheet" href="jeasyui/themes/default/easyui.css" type="text/css"></link>
<link rel="stylesheet" href="jeasyui/themes/icon.css" type="text/css"></link>
<script type="text/javascript" src="jeasyui/locale/easyui-lang-zh_CN.js" charset=UTF-8></script>
<script type="text/javascript" charset=UTF-8>
$(function(){
$("#login").dialog({
modal:true,
closable: false,
buttons:[
{
text:"登陆",
handler:function(){
console.info($('#frm').serialize());//序列化form
$.ajax({
type: "POST",
cache:false,
dataType:'json',
url:"student.do?method=login",
data:{
user:$('#user').val(),
psw:$('#psw').val()
},
success: function(msg){
$.messager.alert('标题', "Data Saved: " + msg.msg );
}
})
}
},
{
text:"重置",
handler:function(){
$('#user').val('');
$('#psw').val('');
}
}]
});
})
</script>
</head>
<body>
<div id="login" title="用户登陆" style="width:350px;height:200px;top:150px;">
<form id="frm" method="post">
<table style="margin-top:20px;">
<tr>
<th>用户名:</th>
<td><input id="user"></td>
</tr>
<tr>
<th>密码:</th>
<td><input id="psw" type="password" ></td>
</tr>
</table>
</form>
</div>
</body>
</html>