Button JavaScript Ative Off Off
<div class="form-check form-switch"> <input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault"></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
const btn = document.querySelector(".form-check-input")
label = document.querySelector(".form-check-label");
btn.addEventListener("change", function() {
this.checked ? label.innerHTML = "Button Turned On" :
label.innerHTML = "Button Turned Off"
});
</script>
Undefined