Похожие чаты

There is this js code that I can paste into

console, and then make functions empty to make it stop working.
Nothing wrong so far.
But when I place it in an individual js file and use this code, I can't make functions empty and make it stop working. Since it's a checkbox, I'm using this:


function () {
var checkBox = document.getElementById("myelement");

if (checkBox.checked == true){

function bla(){
// my code
}

} else {
function bla() {} // to make it empty and stop working
}
}

What's wrong?

1 ответов

9 просмотров

What is you function doing on the else?

Похожие вопросы

Обсуждают сегодня

Карта сайта