Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <----- BODY ----->
- <button id="start" onclick="start_Int()">Start</button>
- <button id="ende" onclick="stop_Int()">Ende</button>
- <div style="display:flex;" id="count"></div>
- <----- SCRIPT ----->
- var intval="";
- function start_Int(){
- intval=window.setInterval("start_count()",1000);
- }
- function stop_Int(){
- window.clearInterval(intval)
- }
- function start_count(){
- var p = document.createElement('p');
- p.appendChild(document.createTextNode('+'));
- document.getElementById('count').appendChild(p);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement