Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#button').click(
- function () {
- var info = "";
- //get name
- var userName = $('#userbox').val();
- //get pw
- var password = $('#pwbox').val();
- //checkinfo
- if (userName.trim() == "" && password.trim() == "") {
- info = "*Bạn chưa nhập tên đăng nhập </br> *Bạn chưa nhập mật khẩu";
- }
- else if (userName.trim() == "") {
- info = "*Bạn chưa nhập tên đăng nhập";
- }
- else if (password.trim() == "") {
- info = "*Bạn chưa nhập mật khẩu";
- }
- else if (userName.trim() != "admin") {
- info = "*Tên đăng nhập không tồn tại trong hệ thống";
- }
- else {
- if (password.trim() != "12345678") {
- info = "*Mật khẩu không chính xác";
- }
- else {
- info = "*Đăng nhập thành công";
- }
- }
- $("#noti").html(info);
- }
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement