提交 | 用户 | age
|
a6a76f
|
1 |
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> |
F |
2 |
<% |
|
3 |
String queryString = (String)request.getAttribute("inputPwd_queryString"); |
|
4 |
String uri = (String)request.getAttribute("inputPwd_uri"); |
|
5 |
String formid = (String)request.getAttribute("inputPwd_formid"); |
|
6 |
String message = (String)request.getAttribute("inputPwd_msg"); |
|
7 |
if(queryString==null)queryString=""; |
|
8 |
if(uri==null)uri=""; |
|
9 |
if(formid==null)formid=""; |
|
10 |
%> |
|
11 |
|
|
12 |
<html> |
|
13 |
<head> |
|
14 |
<base target="_self" /> |
|
15 |
<title> |
|
16 |
需要输入密码才能继续 |
|
17 |
</title> |
|
18 |
<script type="text/javascript" src="/js/jquery-1.4.4.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery-1.4.4.min.js")%>"></script> |
|
19 |
<style type="text/css"> |
|
20 |
*{font-family:'Verdana','宋体';} |
|
21 |
.in{border:1px solid #cccccc;height:22px;} |
|
22 |
ul{list-style: none;font-size: 10pt;font-family:'Verdana','宋体';height:24px;line-height: 24px;vertical-align: middle;margin:auto; } |
|
23 |
</style> |
|
24 |
<script type="text/javascript"> |
|
25 |
function sub(){ |
|
26 |
var p1=document.getElementById("password").value; |
|
27 |
var p2=document.getElementById("password2").value; |
|
28 |
if(trim(p1)==""){ |
|
29 |
alert("请输入密码!"); |
|
30 |
document.getElementById("password").focus(); |
|
31 |
return false; |
|
32 |
} |
|
33 |
if(p1!=p2){ |
|
34 |
alert("两次输入的秘密不一致!"); |
|
35 |
document.getElementById("password2").focus(); |
|
36 |
return false; |
|
37 |
} |
bf4c38
|
38 |
$.ajax({ |
X |
39 |
url: "/inputPwdAdd.do", |
|
40 |
data: JSON.stringify({ |
|
41 |
"formid": "<%=formid %>", |
|
42 |
"password": p2, |
|
43 |
"uri": "<%=uri %>", |
|
44 |
"queryString": "<%=queryString %>" |
|
45 |
}), |
|
46 |
type: "POST", |
|
47 |
async:false, |
|
48 |
dataType: "json", |
|
49 |
contentType: 'application/json', |
|
50 |
success: function (data) { |
|
51 |
if (data != null && data.code == 0) { |
|
52 |
location.href = data.data; |
|
53 |
} else { |
|
54 |
$("#password").val(""); |
|
55 |
$("#password2").val(""); |
|
56 |
alert(data.data); |
|
57 |
} |
|
58 |
} |
|
59 |
}); |
a6a76f
|
60 |
return true; |
F |
61 |
} |
|
62 |
function trim(str) |
|
63 |
{ |
|
64 |
return str.replace(/(^\s*)|(\s*$)/g,""); |
|
65 |
} |
|
66 |
window.onload=function(){ |
|
67 |
if(parent.index){ |
|
68 |
parent.resetTabName($("title").html()); |
|
69 |
} |
|
70 |
}; |
bf4c38
|
71 |
$(function () { |
X |
72 |
$("#password").focus(); |
|
73 |
$("#submit").on("click",function () { |
|
74 |
sub(); |
|
75 |
}) |
|
76 |
$("#password2").keydown(function(e){ |
|
77 |
if(e.keyCode==13){ |
|
78 |
sub(); |
|
79 |
} |
|
80 |
}); |
|
81 |
}) |
a6a76f
|
82 |
</script> |
F |
83 |
</head> |
|
84 |
<body style="text-align: center;background-color: #F5F5F5"> |
|
85 |
|
|
86 |
<div style="border:1px solid #cccccc;height:250px;width: 350px;margin:auto;margin-top:130px;"> |
|
87 |
<div style="font-size:14px;font-weight: bold;width:100%;height:30px;background-color: #cccccc;vertical-align: middle;line-height: 30px;">需要输入密码才能继续,您还没有设置密码!</div> |
|
88 |
<div> |
bf4c38
|
89 |
<form action=""> |
a6a76f
|
90 |
<ul style="margin-top:45px;"> |
F |
91 |
<li style="float: left;width:85px;">请输入密码:</li> |
|
92 |
<li style="float: left;"><input class="in" type="password" id="password" name="pwd" value=""></input></li> |
|
93 |
</ul> |
|
94 |
<ul style="margin-top:10px;"> |
|
95 |
<li style="float: left;width:85px;">再次输入密码:</li> |
|
96 |
<li style="float: left;"><input class="in" type="password" id="password2" name="pwd" value=""></input></li> |
|
97 |
</ul> |
|
98 |
<ul style="width:160px;margin-top:15px;"> |
bf4c38
|
99 |
<li style="float: left;"><input type="button" id="submit" style="width:65px;height:24px;" value="确定"></input> </li> |
a6a76f
|
100 |
<li style="float: left;"><input type="button" style="width:65px;height:24px;" onclick="parent.closeTab();" value="关闭"></input> </li> |
F |
101 |
</ul> |
|
102 |
<input type="hidden" name="queryString" value="<%=queryString %>"></input> |
|
103 |
<input type="hidden" name="uri" value="<%=uri %>"></input> |
|
104 |
<input type="hidden" name="formid" value="<%=formid %>"></input> |
|
105 |
</form> |
|
106 |
</div> |
|
107 |
</div> |
|
108 |
<% |
|
109 |
if(message!=null&&!"".equals(message)){ |
|
110 |
out.write("<script type='text/javascript'>alert('"+message+"');</script>"); |
|
111 |
} |
|
112 |
%> |
|
113 |
</body> |
|
114 |
</html> |