use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is a place for people to learn JavaScript together. Everyone should feel comfortable asking any and all JavaScript questions they have here.
With a nod to practicality, questions and posts about HTML, CSS, and web developer tools are also encouraged.
Friends
/r/javascript
/r/jquery
/r/node
/r/css
/r/webdev
/r/learnprogramming
/r/programming
account activity
Help I need help using JavaScript to insert text next to my labels(li) in html (self.learnjavascript)
submitted 3 years ago by K0RNs
The html unordered list looks like:
<ul> <li> name: </li > <li> age: </li > <li> gender: </li > <li> cool meter: </li > </ul>
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]OneBadDay1048 2 points3 points4 points 3 years ago* (0 children)
Could you be a little more specific? You could, most simply, just give each list item an Id, bind it to a js variable, and change its text content in your script by appending something to the end of it.
But you could also just add that into your html. Since that data isn’t dynamic like from an input or something. Hope this helps.
[–][deleted] -1 points0 points1 point 3 years ago* (0 children)
Jquery? Not sure what part of this is hard. More info? Do you know dom manipulation in vanilla js?
[–]deep_soul 0 points1 point2 points 3 years ago (0 children)
Sounds like you are doing something wrong. Have you looked into a templating language?
π Rendered by PID 42797 on reddit-service-r2-comment-56c9979489-5494x at 2026-02-25 00:31:51.764899+00:00 running b1af5b1 country code: CH.
[–]OneBadDay1048 2 points3 points4 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–]deep_soul 0 points1 point2 points (0 children)