Authored by xuqi

icon tip

... ... @@ -20,12 +20,18 @@
<li class="relative">
<input id="account" class="account input va" name="account" type="text" placeholder="邮箱/手机号码" autocomplete="off">
<ul id="email-autocomplete" class="email-autocomplete hide"></ul>
<span class="err-tip hide"></span>
<span class="err-tip hide">
<i></i>
<em></em>
</span>
</li>
<li class="relative">
<input id="password" class="password input va" name="password" type="text" placeholder="密码" autocomplete="off" maxlength="20">
<span id="caps-lock" class="caps-lock hide">大写状态开启</span>
<span class="err-tip hide">请输入密码</span>
<span class="err-tip hide">
<i></i>
<em>请输入密码</em>
</span>
</li>
<li>
<span id="login-btn" class="login-btn btn">登录</span>
... ...
... ... @@ -65,7 +65,7 @@ function validateAccount() {
$accountTip.addClass('hide');
$account.removeClass('error');
} else {
$accountTip.text(err).removeClass('hide');
$accountTip.removeClass('hide').children('em').text(err);
$account.addClass('error');
}
return pass;
... ... @@ -91,7 +91,7 @@ function validatePassword() {
$passwordTip.addClass('hide');
$password.removeClass('error');
} else {
$passwordTip.text(err).removeClass('hide');
$passwordTip.removeClass('hide').children('em').text(err);
$password.addClass('error');
}
}
... ... @@ -111,11 +111,11 @@ function validate() {
if (password === '') {
//账户名和密码都为空的情况下点击登陆,只在账户输入框后显示错误提示
$accountTip.addClass('both-error').text('请输入账户名和密码').removeClass('hide');
$accountTip.addClass('both-error').removeClass('hide').children('em').text('请输入账户名和密码');
$passwordTip.addClass('hide');
$password.addClass('error');
} else {
$accountTip.text('请输入账户名').removeClass('hide');
$accountTip.removeClass('hide').children('em').text('请输入账户名');
}
}
... ...
@import "login", "register", "back";
$tip: sprite-map("passport/tip/*.png", $spacing: 10px);
.passport-page {
width: 1150px;
margin-left: auto;
... ... @@ -45,8 +47,17 @@
white-space: nowrap;
top: 8px;
left: 285px;
padding: 6px 0 6px 20px;
padding: 6px 0;
color: #f00;
i {
display: block;
float: left;
height: 14px;
width: 14px;
background: sprite($tip, error) no-repeat;
margin-right: 5px;
}
}
}
... ...
@import "passport/*.png";
$third: sprite-map("passport/*.png");
$third: sprite-map("passport/third/*.png");
.login-page {
.relative {
... ...