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

126
Views
cómo cambiar la etiqueta Título css en Javascript

mis css son

 label[title="Hot"]{ display:none; } label[title="Cold"]{ display:none; }

¿Podría ayudarme? ¿Cómo puedo cambiar esto a JavaScript?

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

0

var hot_label = dcoument.querySelector('label[title="hot"]'); var cold_label = dcoument.querySelector('label[title="Cold"]'); //If you want to hide. hot_label.style.display = "none"; cold_label.style.display = "none";
about 4 years ago · Juan Pablo Isaza Report

0

Parece que estás preguntando cómo hacer lo mismo en JavaScript. Si es así, deberá crear un elemento DOM de tipo 'etiqueta' y establecer sus propiedades de la misma manera que lo haría si usara .getElementById o .querySelector . Debería verse algo como:

 var hot_label = document.createElement('label'); hot_label.title="Hot"; hot_label.display="none"; var cold_label = document.createElement('label'); cold_label.title="Hot"; cold_label.display="none";

Entonces tendrías que ponerlos en algún lugar. Digamos, por ejemplo, que su html tiene <div id="tempLabels"></div> . Primero obtendría el contenedor, luego agregaría los nuevos elementos DOM.

 var container = document.getElementById('tempLabels'); container.appendChild(hot_label); container.appendChild(cold_label);

Alternativamente, podría tener una etiqueta y cambiar el título:

 var temp_label = document.createElement('label'); // when temp is hot temp_label.title="Hot"; temp_label.display="inline-block"; //or whatever display type you're using // when temp is cold temp_label.title="Cold"; temp_label.display="inline-block"; //or whatever display type you're using // hide label temp_label.display="none";
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!