切换导航条
此项目
正在载入...
登录
李涵
/
integral
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
李洪娟
6 years ago
提交
181a8e5998952675a3f1d0fa2ee50a57275fee4b
1 个父辈
66e6ebbf
1 个管道 的构建
通过
耗费 2 秒
修改两个页面的密码
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
102 行增加
和
14 行删除
public/themes/simpleboot3/friendship/enter_password.html
public/themes/simpleboot3/friendship/sure_password.html
public/themes/simpleboot3/friendship/enter_password.html
查看文件 @
181a8e5
...
...
@@ -70,24 +70,24 @@
<body>
<div
class=
"container"
>
<p
class=
"passwordnum"
>
输入密码
</p>
<ul
class=
"enterpassword"
>
<ul
class=
"enterpassword"
id=
"wrap"
>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
</ul>
<p
class=
"nextstep"
>
下一步
</p>
...
...
@@ -98,5 +98,47 @@
$
(
".nextstep"
).
click
(
function
(){
window
.
location
.
href
=
"{:url('friendship/Friend/surePassword')}"
})
//输入的密码自动输入到下一个
onload
=
function
(){
var
arr
=
[];
var
str
=
""
var
txts
=
wrap
.
getElementsByClassName
(
"entercode"
);
console
.
log
(
txts
)
for
(
var
i
=
0
;
i
<
txts
.
length
;
i
++
){
var
t
=
txts
[
i
];
t
.
index
=
i
;
if
(
t
.
index
>
0
){
t
.
setAttribute
(
"readonly"
,
true
);
}
t
.
onkeyup
=
function
(){
var
regular
=
/
\s
+/g
;
if
(
regular
.
test
(
this
.
value
)){
$
(
this
).
focus
();
}
else
if
(
$
(
this
).
val
()
==
""
){
$
(
this
).
focus
();
}
else
{
console
.
log
(
$
(
this
).
val
());
arr
.
push
(
$
(
this
).
val
());
var
next
=
this
.
index
+
1
;
if
(
next
>
txts
.
length
-
1
)
return
;
txts
[
next
].
removeAttribute
(
"readonly"
);
txts
[
next
].
focus
();
}
}
if
(
t
.
index
==
5
){
t
.
onkeyup
=
function
(){
arr
.
push
(
$
(
this
).
val
())
console
.
log
(
arr
);
var
str
=
arr
[
0
]
+
arr
[
1
]
+
arr
[
2
]
+
arr
[
3
]
+
arr
[
4
]
+
arr
[
5
];
console
.
log
(
str
)
}
}
}
txts
[
0
].
removeAttribute
(
"readonly"
);
}
</script>
</html>
...
...
public/themes/simpleboot3/friendship/sure_password.html
查看文件 @
181a8e5
...
...
@@ -67,27 +67,73 @@
<body>
<div
class=
"container"
>
<p
class=
"passwordnum"
>
确认密码
</p>
<ul
class=
"enterpassword"
>
<ul
class=
"enterpassword"
id=
"wrap"
>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
<li>
<input
type=
"
text
"
>
<input
type=
"
number"
class=
"entercode
"
>
</li>
</ul>
<p
class=
"nextstep"
>
确认
</p>
</div>
<script
type=
"text/javascript"
src=
"__INDEX__/js/jquery.min.js"
></script>
<script>
//输入的密码自动输入到下一个
onload
=
function
(){
var
arr
=
[];
var
str
=
""
var
txts
=
wrap
.
getElementsByClassName
(
"entercode"
);
console
.
log
(
txts
)
for
(
var
i
=
0
;
i
<
txts
.
length
;
i
++
){
var
t
=
txts
[
i
];
t
.
index
=
i
;
if
(
t
.
index
>
0
){
t
.
setAttribute
(
"readonly"
,
true
);
}
t
.
onkeyup
=
function
(){
var
regular
=
/
\s
+/g
;
if
(
regular
.
test
(
this
.
value
)){
$
(
this
).
focus
();
}
else
if
(
$
(
this
).
val
()
==
""
){
$
(
this
).
focus
();
}
else
{
console
.
log
(
$
(
this
).
val
());
arr
.
push
(
$
(
this
).
val
());
var
next
=
this
.
index
+
1
;
if
(
next
>
txts
.
length
-
1
)
return
;
txts
[
next
].
removeAttribute
(
"readonly"
);
txts
[
next
].
focus
();
}
}
if
(
t
.
index
==
5
){
t
.
onkeyup
=
function
(){
arr
.
push
(
$
(
this
).
val
())
console
.
log
(
arr
);
var
str
=
arr
[
0
]
+
arr
[
1
]
+
arr
[
2
]
+
arr
[
3
]
+
arr
[
4
]
+
arr
[
5
];
console
.
log
(
str
)
}
}
}
txts
[
0
].
removeAttribute
(
"readonly"
);
}
</script>
</body>
</html>
...
...
请
注册
或
登录
后发表评论