0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Js]document.getElementById()

Posted at

document.getElementById()

document.getElementById()とは?

該当するidの要素にアクセスすることができる関数である。
(해당하는id의 요소에 접근할수 있는 함수)

例えば<~id = lucky>という要素がある。document.ElementById("lucky")という文書があったとして<~id = lucky>のところにアクセスができる。
(예를 들어서<~id = lucky>라고 하는 부분이 있을때 document.ElementById("lucky")라고 입력하면 <~id = lucky>에 접근할 수 있다. )

getElementById()の使い方。

element = document.getElementById(id);
(id)はアクセス、操作したい要素のidを入力
((id)는 접근,조작하고자 하는 요소의id을 입력)

実際にコードを書いてみた。(写真あり)

スクリーンショット 2019-09-14 18.07.00.png

スクリーンショット 2019-09-14 18.10.34.png

スクリーンショット 2019-09-14 18.10.54.png

本日はここまで。よくやった。毎日アップするよ〜
(오늘은 여기까지.잘했다.매일매일 업로드 할꺼야~)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?