var
stop =
null
;
i = 0;
function
funNumbers() {
document.getElementById(
'p'
).innerHTML += ++i +
' '
}
funMake() {
stop = setInterval(
'funNumbers()'
, 500);
funStop() {
clearInterval(stop);
window.onload =
() {
'b'
).onclick = funStop;
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
input
id
"b"
type
"button"
value
"Stop"
br
p
"p"
funMake();