web登陆通常注意如下几点:css
1)拥有元素:用户名,密码(密码字符显示与隐藏功能),登陆按钮,忘记密码连接(忘记用户名连接),注册连接html
2)用户体验:html5
•页面显示,光标默认停在第一个输入框 利用html5的 autofocus属性实现web
•密码默认以....显示,利用input标签的 type="password"实现ajax
•点击登陆按钮后,利用ajax技术先验证用户名是否存在,密码是否正确,不正确要有合理的提示;正确才能进行页面跳转spa
•禁掉css后 表单仍然显示比较好的格式code
<fieldset id="login"> <legend>后台登陆系统</legend> <form> <p> <label>用户名 <input name="name" class="name" type="text" id="name" value="" autofocus="autofocus" /> </label> </p> <p> <label>密 码 <input name="password" class="password" type="password" id="password" value="" /> </label> </p> <p id="warning" class="warning"></p> <p> <input type="button" id="submitBtn" class="button" value="登陆"/> </p> </form> </fieldset>