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>

post.php AJAX request not being called when publishing post
Why Ajax post is not working? How do I send an Ajax request on the same page? How do I know if Ajax is working? How Ajax get data from another page in...
Dropdown that populates the form
What is form drop down list? How do you generate input fields based on value from a drop down list? How do you dynamically populate a gravity form fie...
Add Tag to post after publishing
You go and edit the post you have already posted. Then you add the tags you want you type them into the “tags” box manually, and then press ADD. Then ...