Lösung des Problems
Von dort entfernen ()
, wo Sie anrufenmyfunction
window.onload = function() {
$("#checkboxid").click(myfunction);
}
function myfunction() {
console.log('here')
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input type="checkbox" id="checkboxid" label="Click Me">
Keine Kommentare:
Kommentar veröffentlichen