TAILIEUCHUNG - Pro JavaScript Techniques phần 8

Để làm cho các sự kiện JavaScript của bạn hơn có thể truy cập, bất cứ lúc nào bạn sử dụng các nhấp chuột, rê chuột, và các sự kiện mouseout, bạn cần phải mạnh mẽ xem xét cung cấp các cam kết ràng buộc nonmouse thay thế. Rất may có nhiều cách dễ dàng để nhanh chóng khắc phục tình trạng này | 246 CHAPTER 11 ENHANCING BLOGS WITH AJAX In this chapter you built two add-ons to a typical WordPress-based blogging platform. Specifically you removed the need for navigating old posts with antiquated links and pagination. Instead you are loading blocks of posts dynamically while the user is browsing the page. Additionally if a new post is posted while the user is looking at the page the post will be added allowing the user to continue reading without ever leaving the page. Both of these additions allow for the browsing experience to become much more dynamic and fluid without posts being broken up between multiple pages. In the next chapter you will build up an advanced piece of Ajax functionality an autocomplete search. CHAPTER 12 Autocomplete Search The most important functionality that Ajax technology affords is the ability to create highly interactive user interfaces many of which weren t previously possible. An example of one of these new user interface elements is what s known as the autocomplete search field. The autocomplete search field is much like a normal text field but it automatically completes search terms as you begin to type them in. This means that as you re typing a search query the client is sending requests to the server in the background in an attempt to give you faster and more accurate results. In this chapter I go through each of the components that are needed to build a full autocomplete search. First you ll see how to construct and lay out the page followed by how to watch for user input in the text entry field. All of this will hook into a simple Ajax request that will go to a simple server-side database. Examples of Autocomplete Search An autocomplete search field can manifest in a couple different ways. For example Google has an autocomplete version of its search box called Google Suggest http webhp complete 1 . When you begin typing your search query into the field it shows you other searches that other users have .

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.