Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cntBroadcast() {
- console.warn("HALLO ICH BIN IN DER KONSOLE LMAO");
- var para = document.createElement('p');
- para.textContent = 'You clicked the button!';
- document.body.appendChild(para);
- }
- var buttons = document.querySelectorAll('button');
- for (var i = 1; i < buttons.length ; i++) {
- buttons[i].addEventListener('click', cntBroadcast);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement