Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

315
Views
DOM ul element, how to create it?

I have this element at index.html:

<div id="app"></div>

How can I write a query to get that DOM element? And create a new UL element and append it to the previously mentioned <div> element?

Like here:

function displayUsers(users) {
  // ??????????
};
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

const ul = document.createElement('ul')
const li = document.createElement('li')
const textNode = document.createTextNode('some text')
li.appendChild(textNode)
ul.appendChild(li)
document.getElementById('app').appendChild(ul)

an example here https://www.w3schools.com/jsref/met_node_appendchild.asp

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!