JavaScript『DOM』

関連タイピング
-
JAVAの練習用です。
プレイ回数1140長文120秒 -
プログラミングを学びたい方は是非!2013/07/03公開
プレイ回数35万1071打 -
プログラミングを学びたい方は是非!2025/05/21公開
プレイ回数270610打 -
コマンドラインやプログラミング言語のタイピング練習用
プレイ回数1558英語長文90秒 -
chatGPTに作らせた部分一致検索サイトです。
プレイ回数842長文590打 -
vue Lifecycle Hooks
プレイ回数192英語157打 -
プレイ回数691短文9打
-
超ロングコマンドがたくさん流れてくるので時間がかかります。
プレイ回数849長文英字2139打
問題文
(document.getElementById('id');)
document.getElementById('id');
(document.getElementsByTagName('h1');)
document.getElementsByTagName('h1');
(document.getElementsByName('name');)
document.getElementsByName('name');
(document.getElementsByClassName('class');)
document.getElementsByClassName('class');
(document.querySelector('#id');)
document.querySelector('#id');
(document.querySelectorAll('.class');)
document.querySelectorAll('.class');
(li_all=ul.childNodes;)
li_all=ul.childNodes;
(li_0=ul.childNodes[0];)
li_0=ul.childNodes[0];
(ul=li.parentNode;)
ul=li.parentNode;
(li_0=ul.firstChild;)
li_0=ul.firstChild;
(li_last=ul.lastChild;)
li_last=ul.lastChild;
(li_first=second.previousSibling;)
li_first=second.previousSibling;
(third=second.nextSibling;)
third=second.nextSibling;
(document.createElement('ul');)
document.createElement('ul');
(ul.appendChild('li');)
ul.appendChild('li');
(document.createElement('div');)
document.createElement('div');
(const h2=document.getElementsByTagName('h2'); h2[0].innerText='';)
const h2=document.getElementsByTagName('h2'); h2[0].innerText='';
(h2[0].innerHTML='<i>MENU</i>';)
h2[0].innerHTML='<i>MENU</i>';
(h2[1].setAttribute('align','center');)
h2[1].setAttribute('align','center');
(const div1=document.getElementById('div0'); div0.insertAdjacentHTML('beforebegin','<div>div0</div>');)
const div1=document.getElementById('div0'); div0.insertAdjacentHTML('beforebegin','<div>div0</div>');
(div1.insertAdjacentHTML('afterbegin','<div>div2</div>');)
div1.insertAdjacentHTML('afterbegin','<div>div2</div>');
(div1.insertAdjacentHTML('beforeend','<div>div3</div>');)
div1.insertAdjacentHTML('beforeend','<div>div3</div>');
(div1.insertAdjacentHTML('afterend','<div>div4</div>');)
div1.insertAdjacentHTML('afterend','<div>div4</div>');