code
Introductory code test
Table of contents
array api
console.log("hello array filter");html tab
<button id="btn1">123</button>
<button id="btn2">456</button>
<div class="text" id="hello">Hello World</div>.text {
font-size: 12px;
color: #000;
width: 100%;
background: red;
}var el = document.querySelector("#hello");
var btn1 = document.querySelector("#btn1");
var btn2 = document.querySelector("#btn2");
btn1.onclick = function () {
console.log("Hello World");
el.style.height = "200px";
};
btn2.onclick = function () {
console.log("Hello World");
el.style.height = "800px";
};html no tab
<div id="hello">Hello</div>html no live
<div id="hello">Hello</div>#hello {
color: red;
font-size: 16px;
}html other
<div id="hello">Hello</div>#hello {
color: red;
font-size: 16px;
}