Published
Edited
Jun 10, 2020
1 star
Insert cell
Insert cell
Insert cell
btn01 = html`<button>누르면 안보이다 약 2초 후에 나타나는 버튼</button>`
Insert cell
btn01.onclick = btnHandler
Insert cell
btnHandler = e => {
// 여기에 작성
}
Insert cell
Insert cell
doc02 = html`
<div style="height:3em;">
<select style="height: 2em;">
<option value="1" selected>1초마다</option>
<option value="3">3초마다</option>
</select>
<span>깜빡깜빡</span>
</div>
`
Insert cell
doc02.querySelector("select")[0]
Insert cell
/*
{ // 1초마다 깜빡거리능 예제 코드
const span = doc02.querySelector("span")
setInterval( () => span.hidden = !span.hidden, 1000 )
}
*/
Insert cell
Insert cell
doc03 = html`
<div style="height:3em;">
<select style="height: 2em;">
<option value="0" selected>중지</option>
<option value="2">2초마다</option>
</select>
<span>깜빡깜빡</span>
</div>
`
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more