10 changed files with 70 additions and 31 deletions
@ -0,0 +1,10 @@ |
|||||
|
function validateForm() { |
||||
|
var password = document.forms["form"]["password"].value |
||||
|
var confrim_pwd = document.forms["form"]["confrim_pwd"].value |
||||
|
if (confrim_pwd !== password) { |
||||
|
alert("确认密码与密码不相同") |
||||
|
return false |
||||
|
} |
||||
|
delete document.forms["form"]["confrim_pwd"].value |
||||
|
return true |
||||
|
} |
Binary file not shown.
@ -0,0 +1,22 @@ |
|||||
|
extends /layout/layout |
||||
|
|
||||
|
block var |
||||
|
-title="注册" // 网页标题 |
||||
|
-hideHeader=true |
||||
|
|
||||
|
block head |
||||
|
+css("style/views/login.css") |
||||
|
|
||||
|
block content |
||||
|
.login |
||||
|
h1.title.is-1 注册 |
||||
|
form(name="form" action='/register' method='post' onsubmit="return validateForm()") |
||||
|
input(type='text', name='username', placeholder='用户名', required) |
||||
|
input(type='password', name='password', placeholder='密码', required) |
||||
|
input(type='password', name='confrim_pwd', placeholder='确认密码', required) |
||||
|
+security |
||||
|
button.btn.btn-primary.btn-block.btn-large(type='submit') 现在注册! |
||||
|
a(href="/login" style="margin-top: 8px;color: white;font-size: 14px;display: inline-block;float: right") 已有账户,前往登陆 |
||||
|
|
||||
|
block script |
||||
|
+script("js/page/register.js") |
Loading…
Reference in new issue