TAILIEUCHUNG - PHP jQuery Cookbook phần 9

Ràng buộc với PHP và jQuery 2 dữ liệu. Lưu ý rằng chúng tôi đã giới thiệu đến một tập tin trong phần đầu. CSS thuộc tính rất quan trọng đối với ví dụ này là chúng tôi có vị trí ul, ngay dưới hộp văn bản. Tạo một tập tin mới có tên và đặt các thuộc tính CSS sau đây trong nó: | Simpo PDF Merge and Split Unregistered Version - http Data Binding with PHP and jQuery--------------------------------------------- 2. Note that we have referred to a file in the head section. CSS attributes are very important for this example as we have to position the ul just under the textbox. Create a new file named and place the following CSS properties in it body font-family Trebuchet MS verdana arial width 400px marg in 0 auto .autosuggest width 200px top 5px position relative input width 200px suggestions position absolute list-style none margin 0 padding 0 width 200px display none background-color ECECF6 top 20px left 0px suggestions li cursor pointer padding 5px border-right 1px solid 000 border-bottom 1px solid 000 border-left 1px solid 000 .active background-color red color fff error top 25px font-weight bold color ff0000 260 Simpo PDF Merge and Split Unregistered Version - http ---------------------------------------------------------------------Chapter 8 loader position absolute top 2px right 0 display none 3. Focusing on jQuery now add the file before the closing of the body tag. Now define four event handlers that will get the suggestions from the database and display them in a list at a proper position. Call function getSuggestions on keyup. This is the core function that picks up keystrokes and gets matching results using an AJAX request. Value of textbox is sent through an AJAX request to a PHP file . On receiving the results function showSuggestions executes which creates a list from received data and displays it. 4. Function navigateList will be executed on keydown event. It will take care of the navigation by adding functionality for up and down arrow keys and the Enter key for selecting a list item. Next are two functions for mouse movements. The first function listHover will execute whenever the mouse pointer enters or leaves a list item and will change the look .

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.