Markedcheckbox

Add javascript to get the value of checkbox or select box

Add javascript to get the value of checkbox or select box

You can also use the below code to get all checked checkboxes values.

  1. <script>
  2. document.getElementById('btn').onclick = function()
  3. var markedCheckbox = document.querySelectorAll('input[type="checkbox"]:checked');
  4. for (var checkbox of markedCheckbox)
  5. document.body.append(checkbox.value + ' ');
  6. </script>

Basic CPT Question About Categories
What are the 3 categories of CPT codes? What types of procedures or services are included in each of the CPT code categories? What are Category I CPT ...
Secure WordPress API, how?
How to Secure the REST API Disable REST API — Disable REST completely for all non-logged users. REST API Toolbox — Disable only the REST users endpoin...
See which user role / capability is needed to use a plugin
How do I see user capability in WordPress? How do I add or remove capabilities to user roles in WordPress? How do I manage user roles in WordPress? Wh...