0
Follow
0
View

get ul li elements inside other ul li Javascript

sharonrain 注册会员
2023-01-25 03:55

It would be much more ul to give them useful classnames, so that you can select them directly. eg: outer and inner.

function cambiar_parrafo_2(value) {
  document.querySelector("input").style.display = "inline"
  let container = document.querySelector(".col-12")
  let texto = container.querySelectorAll("article ul.inner li")
  for (let i = 0; i < texto.length; i++) {
    texto[i].textContent = value
  }
}

cambiar_parrafo_2('sdfsdfds')

Industry Experience

  • Project FIUBA, Algorithms and Programming I, Argentina, 2021
    • Project FIUBA, Algorithms and Programming I, Argentina, 2022

About the Author

Question Info

Publish Time
2023-01-25 03:55
Update Time
2023-01-25 03:55

Related Question

求Linux的解决方法

AuthenticationContext.acquretokenasync(string, ClientCredential)是过时的

httpclient5-testing maven dependency for LocalServerTestBase

Angular:如何根据路由拥有两个不同的index.html文件

分析项目solid用户故事

将整数1-100存入一个List集合中并输出 * 之后将集合中40-60的元素翻转后并输出

如何修改阿波罗客户端的@client字段?

NextJS localStorage.getItem()方法在组件上不工作?

动态插入按钮触发按钮onClick事件

Angular -使用指令对html进行操作?