- 注册时间
- 2013-3-11
- 最后登录
- 2015-4-19
- 阅读权限
- 10
- 积分
- 194
- 精华
- 0
- 帖子
- 38
|
XTX827227881 发表于 2013-5-7 15:39
好像写的每个js函数都不能返回值!难道是我的环境有问题?崩溃了,其他的页面就可以呀 ...
全部的代码都在这儿了:(大侠帮个忙吧)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>登录-报名收费系统</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link href="css/demo.css" rel="stylesheet" type="text/css" />
<script src="js/boot.js" type="text/javascript"></script>
<style type="text/css">
body
{
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.loginPanel
{
margin: 120px auto;
height: 240px;
width: 620px;
background: url(image/login_form.gif) no-repeat center;
}
</style>
</head>
<body>
<div id="loginForm" class="loginPanel">
<div style="padding-top: 80px;">
<table>
<tr>
<td style="width: 390px;">
</td>
<td style="width: 40px;">
<label for="username$text">
班级:</label>
</td>
<td>
<input id="uid" name="uid" class="mini-treeselect" url="./data/DataService.aspx?method=GetAllClass" multiselect="false" emptyText="请选择班级" valuefromselect="false"
textfield="text" valuefield="id" parentfield="pid" allowinput="true" onbeforenodeselect="beforenodeselect"
style="width: 150px;" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<label for="pwd$text">
密码:</label>
</td>
<td>
<input id="pwd" name="pwd" onvalidation="onPwdValidation" class="mini-password" emptyText="请输入密码" requirederrortext="密码不能为空"
required="true" style="width: 150px;" onenter="onLoginClick" />
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
<a onclick="onLoginClick" class="mini-button" style="width: 60px;">登录</a> <a onclick="onResetClick"
class="mini-button" style="width: 60px;">重置</a>
</td>
</tr>
</table>
</div>
</div>
<script type="text/javascript">
mini.parse();
function onLoginClick(e) {
var form = new mini.Form("loginForm");
form.validate();
if (form.isValid() == false) return;
var UserID = mini.get("uid");
var uid = UserID.getValue();
var PassWord = mini.get("pwd");
var pwd = $.md5(PassWord.getValue());
//获取随机字符串
var rdstr = getRandomStr();
mini.alert(rdstr);
pwd = $.md5(pwd + rdstr);
//提交信息
//$.post("./data/DataService.aspx?method=UserIsValidation",
//{uid:uid,pwd:pwd},
//function(data,status){
//var result = mini.decode(data);
//mini.alert("UserID: " + result.uid + "\nPassword:" + result.pwd);
//}
//);
}
function getRandomStr(){
var RandomStr = "NO";
RandomStr = $.get("./data/DataService.aspx?method=GetRandomStr",
function(data,state){
RandomStr = mini.decode(data);
}
);
return RandomStr.rdstr;
}
function onResetClick(e) {
var form = mini.Form("loginForm");
form.clear();
}
function beforenodeselect(e) {
//禁止选中父节点
if (e.isLeaf == false) e.cancel = true;
}
/////////////////////////////////////
function onPwdValidation(e) {
if (e.isValid) {
if (e.value.length < 6) {
e.errorText = "密码不能少于6个字符";
e.isValid = false;
}
}
}
</script>
</body>
</html> |
|