JavaScript
16
Вклад в тег
var str = "";
str += "<div><h1 class='header'>";
str += "</h1><h2 class='header2'>";
var str = ""
+ "<div><h1 class='header'>"
+ "</h1><h2 class='header2'>"
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('example')
);
var ind = false;
var cycle
item.onclick = function(){
if (!ind) {
cycle = setInterval(changeBG, 100);
ind = true;
} else {
clearInterval(cycle);
ind = false;
}
};
var timer
item.onclick = function(){
if (!timer) {
timer = setInterval(changeBG, 100);
} else {
timer = clearInterval(timer);
}
};