TAILIEUCHUNG - Pro JavaScript Techniques phần 6

Giai đoạn cuối cùng để đi vào xem xét khi phát triển một ứng dụng web hoàn toàn không phô trương là để đảm bảo rằng các sự kiện của bạn sẽ làm việc ngay cả khi không sử dụng một con chuột. Bằng cách này, bạn có thể giúp hai nhóm người: những người cần hỗ trợ khả năng tiếp cận | 170 CHAPTER 8 IMPROVING FORMS body form action method POST fieldset class login legend Login Information legend label for username class hover Username label input type text id username class required text label for password class hover Password label input type password id password class required text fieldset fieldset legend Personal Information legend label for name Name label input type text id name class required text br label for email Email label input type text id email class required email text br label for date Date label input type text id date class required date text br label for url Website label input type text id url class url text value http br label for phone Phone label input type text id phone class phone text br label for age Over 13 label input type checkbox id age name age value yes br input type submit value Submit Form class submit fieldset form body html The next step is to apply some basic CSS styling to your form to make it look more presentable. This will help you in the upcoming sections of this chapter to display error messages and feedback in a presentable manner. The CSS used on the form is shown in Listing 8-2. CHAPTER 8 IMPROVING FORMS 171 Listing 8-2. The CSS Styles Used to Improve the Visual Quality of Your Form form font-family Arial font-size 14px width 300px fieldset border 1px solid CCC margin-bottom 10px input width 125px legend font-weight bold font-size label display block width 60px text-align right float left padding-right 10px margin 5px 0 input margin 5px 0 padding 0 0 0 3px width 172px margin 15px 0 0 70px The screenshot in Figure 8-1 will give you a sense of what your form ready for layers of JavaScript behavior looks like. 172 CHAPTER 8 IMPROVING FORMS Figure 8-1. A screenshot of the styled form that you ll be adding JavaScript behavior to Now that you have a nicely styled form you should begin looking at the issue of clientside form validation more in depth. There are a

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.