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>

How can I show subpages dropdown upon select on parent page to any page
How do I show a list of child pages in a parent page in WordPress? How do I show subpages in WordPress? How do parent pages work in WordPress? How do ...
insert metadata on title
How do you add meta title? How do I embed metadata in Word? Is a title metadata? How do I add a meta description? What is the difference between title...
Is there a way to programmatically enable a plugin?
How do I enable programmatically plugins in WordPress? How do I activate plugins? How do I stop WordPress plugins from loading on specific pages and p...