TAILIEUCHUNG - Learning Web Design Third Edition- P18

Learning Web Design Third Edition- P18:Everything you need to know to create professional web sites is right here. Learning Web Design starts from the beginning defining how the Web and web pages work and builds from there. By the end of the book, you'll have the skills to create multi-column CSS layouts with optimized graphic files, and you'll know how to get your pages up on the Web. | The Great Form Control Round-up Radio and checkbox buttons Both checkbox and radio buttons make it simple for your visitors to choose from a number of provided options. They are similar in that they function like little on off switches that can be toggled by the user and are added using the input element. They serve distinct functions however. A form control made up of a collection of radio buttons is appropriate when only one option from the group is permitted or in other words when the selections are mutually exclusive such as Yes or No or Male or Female . When one radio button is on all of the others must be off sort of the way buttons used to work on old radios press one button in and the rest pop out. When checkboxes are grouped together however it is possible to select as many or as few from the group as desired. This makes them the right choice for lists in which more than one selection is okay. Radio buttons input type radio Radio button NOTE In XHTML documents the value of the checked attribute must be explicitly set to checked as shown in the example. In HTML documents you don t need to write out the value for the checked attribute. It can be minimized as shown here input type radio name foo checked The examples in this chapter follow XHTML syntax in which all attributes have explicit values. Radio buttons are added to a form with the input element with the type attribute set to radio. The name attribute is required. Here is the syntax for a minimal radio button input type radio name variable In this example radio buttons are used as an interface for users to enter their age group a person can t belong to more than one age group so radio buttons are the right choice . Figure 9-8 shows how radio buttons are rendered in the browser. fieldset legend How old are you legend ol li label input type radio name age value under24 checked checked under 24 label li li label input type radio name age value 25-34 25 to 34 label li li label input type radio name age .

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.