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

217
Views
¿Cómo agregar atributos a un <textarea> usando javascript?
editElement.addEventListener("click", ()=>{ textComment.setAttribute("disabled", true) textComment.classList.add("uwu") })

Estoy tratando de agregar algunos atributos a mi <textarea> desde .js pero no puedo hacer que funcione

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Usar su código con una función en lugar de agregar un detector de eventos funciona.

 function handleClick() { const demoTextArea = document.querySelector('#demo'); demoTextArea.setAttribute('disabled', true); console.log(demoTextArea); }
 <div> <button onclick="handleClick()">disable input</button> </div> <textarea id="demo"> demo </textarea>

Aquí hay una demostración

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!