.val(value) documentation should discuss checkboxes more accurately

Đang mở
#991 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

@AurelioDeRosa đang làm issue này rồi.

Từ ngày 19/12/2016.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

I created the following issue on the jQuery forums:

http://forum.jquery.com/topic/val-value-does-not-work-on-checkboxes-if-value-is-not-an-array

I like the alternative method brought up by Jake, as it seems more clean. The way that jQuery works does make sense; however, the documentation is misleading. It doesn't state that the use of an Array is required, rather it states that you can use Arrays. I would add a note related to Jakes alternate method for checkboxes, as a better way of working with checkboxes.

Take it easy,
Will

Ngôn ngữ chính
HTML
Star
324
Fork
259
Merge trung bình
1 ngày 30 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jquery/api.jquery.com

Tất cả issue của jquery/api.jquery.com

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.