How to get all checked checkboxes

阅读时长 2 分钟读完

unkulunkuluSameh Farahat提出了一个问题:How to get all checked checkboxes,或许与您遇到的问题类似。

回答者Michael Berkowski给出了该问题的处理方式:

A simple for loop which tests the checked property and appends the checked ones to a separate array. From there, you can process the array of checkboxesChecked further if needed.

-- -------------------- ---- -------
-- ---- --- -------- ---- -- --- --------
-------- --------------------------- -
  --- ---------- - ---------------------------------------
  --- ----------------- - ---
  -- ---- ---- ---- ---
  --- ---- ---- -------------------- ---- -
     -- --- ----- --- ------- ---- ---- -- --------
     -- ----------------------- -
        --------------------------------------
     -
  -
  -- ------ --- ----- -- -- -- ---------- -- ----
  ------ ------------------------ - - - ----------------- - -----
-

-- ---- --
--- ------------ - --------------------------------

希望本文对你有帮助,欢迎支持JavaScript中文网

来源:JavaScript中文网 ,转载请注明来源 https://www.javascriptcn.com/post/27898

纠错
反馈