PHP jQuery Cookbook phần 2

ngoại trừ trong trường hợp các trích dẫn ngắn gọn được nhúng vào trong các bài viết quan trọng hoặc đánh giá. Mọi nỗ lực đã được thực hiện trong việc chuẩn bị của cuốn sách này để đảm bảo tính chính xác của các thông tin được trình bày. | Simpo PDF Merge and Split Unregistered Version - http Handling Events with jQuery------------------------------------------------ strong Toggle All strong label li li input type checkbox class toggle label A Study in Scarlet label li li input type checkbox class toggle label The Sign of the Four label li li input type checkbox class toggle label The Adventures of Sherlock Holmes label li li input type checkbox class toggle label The Valley of Fear label li li input type checkbox class toggle label His Last Bow label li li input type button id getValue value Get Selected Values li li id selected li ul body html 3. Running the file in browser will display the following screen Simpo PDF Merge and Split Unregistered Version - http --------------------------------------------------------------------Chapter 1 4. To bring this page to life include the jQuery library and attach event handlers to the checkboxes. The first event handler will be attached to the first checkbox which will take care of selecting and deselecting all other checkboxes. The second one will be attached to individual checkboxes. It will select deselect the main handle depending on whether all checkboxes are checked or not. The last event handler is for the input button that will display the selected values beneath it. script type text javascript src script script type text javascript document .ready function handle .click function if this .attr checked true .toggle .attr checked true else .toggle .removeAttr checked .toggle .click function if .toggle checked .length .toggle .length handle .attr checked true if .toggle checked .length .toggle .length handle .removeAttr checked getValue .click function var values if .toggle checked .length .toggle checked .each function values this .next label .html selected .html Selected values are values else selected .html Nothing selected script Simpo PDF Merge and Split Unregistered Version - http .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
5    92    2    22-05-2024
Đã 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.