代码如下:
loginfunctionshowmsg(msgdata){
$("#msginfo").hide();
$("#msginfo").html(""+msgdata+"");
$("#msginfo").show(1000);
}
$().ready(function(){
$("#login").click(function(){
varuser=$("#inputEmail").val();varpwd=$("#inputPassword").val();if(user==""||pwd==""){
showmsg("pleaseinputemailandpassword");return;
}
$.post("login.do",{
email:user,
pwd:pwd
},function(data,status){
if(data=="loginok"){
location.href="welcome.jsp";
}else{
showmsg(data);
}
});
});
})
Home
LOGIN
WelcometoSp4System
Password
Rememberme
Signin